相对于其他的一些 binding wrapper,luna 非常 light-weight,也是目前实际项目中选用 binding 方式。这里收集了 luna 相关的一些资料,备查。对于想了解 c++2lua binding 的林林总总,luna 也是一个最好的开始。
luna 绑定的 c++ class,有一个先决条件,就是此 c++ class 仅在 lua 中创建、使用、删除。
而 lunar 则对其作了些许扩展,让此 c++ class 的函数也能比较方便地在 c++ 中使用。
luna 的来源:
http://www.lua.org/notes/ltn005.htmllua 中 binding 一个 c++ class
http://lua-users.org/wiki/SimpleCppBindingluna 的使用:
http://lua-users.org/wiki/SimplerCppBindinglunar 的使用 (luna 的扩展)
http://lua-users.org/wiki/CppBindingWithLunar使用 lunar 中的扩展功能(cpp 中调用 luna c++ class 的函数)
http://lua-users.org/wiki/CallingLuaFromCpp
评论