|
A fifth approach is to use third-party bindings for standard Lua (no stuck-in-5.1 LuaJIT needed) like Sol2. From: Dirk Laurie [mailto:dirk.laurie@gmail.com]
2017-12-22 2:54 GMT+02:00 Gregg Reynolds <dev@mobileink.com>: 2. Use
LuaJIT which has an FFI built in. 3. Do it neatly by hand but stay so close to the the original that the C documentation can be used as is. Most of the better contributions to LuaRocks do this. 4. Hide all the details under a level of abstraction so that the user need not even know which library is being bound. This approach sits underneath
Love2D. Each of these has advantages that in certain situations makes it more approprate tham the others. I think it is a good thing, and typical of the Zen of Lua [1], that the Lua team does not enshrine any of the above. [1] Less is more. |