Wrapping a C library in Lua
Introduction An often overlooked feature of Lua is the C API. The most common use I’ve seen is to allow Lua scripts to use existing C libraries instead of reimplementing existing functionality in pure Lua (which is not always feasible). Fortunately, Lua has very strong integration with C and while not trivial, wrapping a C library is fairly straight foreword. That said Lua’s C API isn’t specific to this task, it’s just a common use of the C API....