[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: BIG request, someone can port luajit ffi module to lua?
- From: Miles Bader <miles@...>
- Date: Tue, 22 Feb 2011 18:34:58 +0900
Wesley Smith <wesley.hoke@gmail.com> writes:
>> My guess has been that this would entail using FFI's parser to
>> automatically produce C-code for a traditional Lua-C interface library,
>> but use dynamic FFI interfaces for LuaJIT. Build-time configuration
>> could detect whether LuaJIT was available or not, and arrange for the
>> appropriate method to be used.
>
> Given the properly generated C code, it could be compiled a runtime
> using luaclang. It doesn't come cheap (Clang/LLVM is a big project),
> but it does compile C-code on the fly quickly. luaclang can be easily
> ripped out of LuaAV simply by grabbing a handful of header files along
> with it.
I suspect for a lot of projects, that would be wayyyy overkill and
compile-time generated thunks would be a better method. Using LLVM
would dramatically increase the size and number of a program's
dependencies, and wouldn't offer any significant speed advantage.
-Miles
--
((lambda (x) (list x x)) (lambda (x) (list x x)))
- References:
- BIG request, someone can port luajit ffi module to lua?, zhiguo zhao
- Re: BIG request, someone can port luajit ffi module to lua?, Javier Guerra Giraldez
- Re: BIG request, someone can port luajit ffi module to lua?, Miles Bader
- Re: BIG request, someone can port luajit ffi module to lua?, Matthew Wild
- Re: BIG request, someone can port luajit ffi module to lua?, Miles Bader
- Re: BIG request, someone can port luajit ffi module to lua?, Wesley Smith