lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

On 22 February 2011 09:34, Miles Bader <> wrote:
> Wesley Smith <> 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.

There is also LuaTCC, which could be used in place of LLVM.