lua-users home
lua-l archive

Re: BIG request, someone can port luajit ffi module to lua?

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


On 22.02.2011 16:37, Javier Guerra Giraldez wrote:
> B) new bindings: here's the splitting danger, FFI is easier to use and
> gets you faster results, so why bother with the C binding? but as i
> see it, once you have the Lua API nailed, adding the C binding is less
> than a day of work in most cases.
I wonder: if there was a way to get ffi introspection data (what
functions are "visible", what arguments they need, etc), maybe it would
be possible to automatically generate C bindings for used functions? So
1. use FFI during development
2. when finished, run converter, which finds every ffi.* usage and
creates module.c file(s).
Of course this converter would be run by luajit, but the resulting
(compiled) module could be used by plain lua. Just a dream I guess...
Regards,
miko

AltStyle によって変換されたページ (->オリジナル) /