3 ms·
LuaJIT was "good enough" at this that it worked pretty well for me -- mostly for automatically binding to headers from my own code where I was careful to avoid
by nikki93 5y ago
LuaJIT was "good enough" at this that it worked pretty well for me -- mostly for automatically binding to headers from my own code where I was careful to avoid some of the potential gotchas. With a macro the header was stringified and sent to LuaJIT; could've also had a build step. eg: https://github.com/nikki93/cgame/blob/master/src/sprite.h#L9 https://github.com/nikki93/cgame/blob/master/src/sprite.h#L9
An added benefit is you get ffi-reflect -- https://github.com/corsix/ffi-reflect https://github.com/corsix/ffi-reflect -- over the resulting types / functions...