lua-users home
lua-l archive

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


Hi,
Luwra [1] is another great library.
Now it supports C++11 compliant compilers, though only C++14 had been
supported once (shameless plugging: this C++11 support is my contribution.)
In contrast to other libraries, with Luara, there is no need to
duplicate method names to bind a C++ class to Lua; which is achieved by
preprocessor macro magic. The following is an example (copied from [1]).

// Register the metatable and constructor
luwra::registerUserType<Point(double, double)>(
    lua,

    // Constructor name
    "Point",

    // Methods need to be declared here
    {
        LUWRA_MEMBER(Point, scale),
        LUWRA_MEMBER(Point, x),
        LUWRA_MEMBER(Point, y)
    },

    // Meta methods may be registered aswell
    {
        LUWRA_MEMBER(Point, __tostring)
    }
);

Even though, Luwra is boost-free and not very complex, especially when
compared to luabind.

Cheers,
Shunsuke.

[1] https://github.com/vapourismo/luwra


On 03/14/2016 12:08 AM, Abhijit Nandy wrote:
> There is luabind-deboostified which does not need to link with boost,
> but uses templates, so longer compilation times.
> 
> https://github.com/decimad/luabind-deboostified
> 
> On Sun, Mar 13, 2016 at 8:22 PM, ThePhD <jm3689@columbia.edu
> <mailto:jm3689@columbia.edu>> wrote:
> 
>     If you're looking for Binding C++ to Lua, I just finished Sol2[1], a
>     fast AND easy Lua <-> C++ binding library. We have documentation now
>     too, and examples. Feel free to  take a look: I was going to make an
>     announcement here, but... well, this is a really timely post you've
>     made!
> 
>     [ 1 ] Reddit Post -
>     https://www.reddit.com/r/cpp/comments/4a8gy7/sol2_lua_c_binding_framework/
> 
>     On Sun, Mar 13, 2016 at 10:42 AM, Jose Marin
>     <jose_marin2@yahoo.com.br <mailto:jose_marin2@yahoo.com.br>> wrote:
> 
>         Hi!
> 
> 
>         What's the best/easier/faster Lua binding library, in your opinion?
> 
>         Thanks
> 
> 
>         Jose
> 
> 
> 
>