Oberon00 / luabind

Luabind is a library that helps you create bindings between C++ and Lua.
http://oberon00.github.io/luabind/
Other
46 stars 13 forks source link
cpp cpp-library cpp11 cpp98 lua luabind

Luabind

Travis CI build status

Luabind is a library that helps you create bindings between C++ and Lua. It has the ability to expose functions and classes, written in C++, to Lua. It will also supply the functionality to define classes in lua and let them derive from other lua classes or C++ classes. Lua classes can override virtual functions from their C++ baseclasses. It is written towards Lua 5.x, and does not work with Lua 4.

It is implemented utilizing template meta programming. That means that you don't need an extra preprocess pass to compile your project (it is done by the compiler). It also means you don't (usually) have to know the exact signature of each function you register, since the library will generate code depending on the compile-time type of the function (which includes the signature). The main drawback of this approach is that the compilation time will increase for the file that does the registration, it is therefore recommended that you register everything in the same cpp-file.

Luabind is released under the terms of the MIT license.

Copyright Daniel Wallin, Arvid Norberg 2003. Extracted from http://www.rasterbar.com/products/luabind/docs.html

This fork

I forked the project since it seems abandoned (latest commit from January 2012 on the 0.9 branch) and I ran into certain bugs which needed fixing (see commits).

This should actually have been forked from rpavlik/luabind: I cherry-picked most commits from there. Additionally, many commits from fhoefler/luaponte are incorporated (as the are in rpavlik's fork). Thus, feel free to do the same with my fork.

In the following two sections, the improvements over the latest official luabind release (0.9) are described.

Fixed bugs

Added features

Additionally, the removal of many lines of death code, also unused (parts of) member variables and other minor improvements make luabind generally (a little bit) faster and less memory hungry.

Many compiler warnings have also been fixed. The remaining (irrelevant) ones are silenced, so the build should be completely warning- (and of course error-)free on Clang, g++ and MSVC.

This fork is fully source (API) compatible to the original luabind library, but not binary compatible.

A word on the branch names

First I worked against the 0.9 branch but then decided to rename it to master, since it actually has become the master branch of development in this fork. The original master branch is now named old-master.