[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Mike Pall's standalone FFI: a dream?
- From: Lorenzo Donati <lorenzodonatibz@...>
- Date: Fri, 03 Jun 2011 16:51:31 +0200
On 02/06/2011 20.17, Florian Weimer wrote:
* Lorenzo Donati:
I'm wondering if there are any chances that LuaJIT FFI will ever
become also a standalone module for stock Lua.
What about the other way round: add a C interpreter to LuaJIT and make
the FFI use libffi? There's still a missing feature, though: C
structure layout is quite architecture-specific (especially for
bitfields), so you'd still need some code to cover that.
Thank you for the reply, but I cannot really comment on this. I don't
use LuaJIT and I don't know it very much. I only skim over the
occasional LuaJIT threads in the list.
I noticed LuaJIT FFI features and found them very interesting for my use
case, which is not about performance, but making some system calls now
and then in the easiest way.
I found very attractive the fact that with LuaJIT FFI you can cut and
paste the prototypes of the functions to be called, without requiring
too much hassle, whereas with other FFI libraries (such as cinvoke) you
have to translate those prototypes in a library-specific way.