lua-users home
lua-l archive

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


Am 14.03.2016 um 07:48 schröbte Shunsuke Shimizu:
Thanks.
I agree that auto-binding doesn't always make sense, and Lua C API
itself is clean and easy to use. But if you are working on C++, template
oriented libraries still can be helpfull, even if you don't need binding
to C++ class. Those provide a type-safer and more concise way to work
with Lua. Caring Lua's stack with the C API is often just tedious.

Anyway "the best/easier/faster Lua binding library" may be Lua C API,
and I also recommend it to beginners, while it is is not a "modern Lua
binding library" at all.

What is a "modern Lua binding library" supposed to look like? Anyway, let's mention my own C binding library called "moon"[1] (very original name, I know). It's basically a higher-level replacement for `luaL_newmetatable()`, `lua_newuserdata()`, and `luaL_checkudata()`. It's most useful if you have lots of different userdata types that may depend on or inherit from each other. So far I've used it for bindings to APR, SDL, and FLTK. The latter is also on GitHub[2].

And finally here[3] is the mandatory link to the relevant wiki page. There may be some abandoned projects listed, but it's usually safe to assume that if Lua 5.3 is supported, it's still used/maintained.

Philipp


  [1]: https://github.com/siffiejoe/lua-moon
  [2]: https://github.com/siffiejoe/lua-fltk4lua
  [3]: http://lua-users.org/wiki/BindingCodeToLua


On 03/14/2016 03:28 PM, Sleepers Tang wrote:
Hi,
Lua is NOT C++ :D. These "AutoBinding Library or Helper Functions" only
help if you already had a C++ project, and you wish to import Lua.  In
other words, if you were start to design your application, the Lua C API
is just enough.