Hacker News new | ask | show | jobs
by PinkMilkshake 268 days ago
PUC Lua is supposedly a bit of a pain for ffi, but I havent tried it myself. Luajit is some kind of crazy magic. You can (almost) just copy and paste the c header file into the ffi.cdef function and then start using c functions as if they were lua functions.
1 comments

The LuaJIT ffi module has been ported to PUC Lua [0] (and abandoned and forked dozens of times), and it works pretty well in my experience.

[0]: https://github.com/dibyendumajumdar/ravi-ffi