Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

nekoflux

differences between various lua binding projects

This topic is 5369 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

sounds like there are a lot of options here...can somebody plz explain the differences between tolua and luabind? they sound like similar projects with very similar goals. Is anyone familiar with the pros/cons of both projects that would care to elaborate? thanks!! neko

Share this post


Link to post
Share on other sites
Advertisement
toLua is a code generator. Working from a cleaned header file it produces code which can interface with Lua.

+ simple to understand process / technique
- tolua 5 is currently in alpha
- requires an extra build step (running toLua to make the interfacing code)
- cleaned headers may require external code (which may lead to synchronization)

Luabind use template techniques to build interfaces to lua at compile time. The documentation for luabind is not pitched at people new to luabind, but it is good documentation, as much as you''ll curse it for the first few days.

+ has more advanced memory management techniques (support for smart pointers and handles)
+ always parses the C++ classes correctly, because it uses the compiler.
+ Support. Luabind''s authors are really helpful, so are the mailing lists - I haven''t looked into support for tolua.
+ Luabind may at some time in the future become a part of boost, which to my way of thinking guarantees ongoing support.
- the examples that come with luabind aren''t particularly helpful for someone trying to learn about scripting and luabind at the same time.
- occasionally the templates are so complicated the VC7.1 will freeze for a while, something to do with intellisense maybe?
- slow build times. This is a big problem (30 seconds per compilation unit on my pIII 1GHz), you will need to use the pimpl idiom to minimise the impact of the luabind headers on the rest of your code.

My personal taste is for luabind, I haven''t actually used toLua, the alpha didn''t come out until after I''d been using luabind for a while. Regardless, code generators worry me - if I forget to do a step it would be hard to debug. IMHO Lua code to interface with C++ using luabind looks neater than the same code using toLua.

Share this post


Link to post
Share on other sites
thanks andrew, I really appreciate youn taking the time to respond and give a detailed diff list...Its replies like these that really save people a lot of time.



kind regards,

neko

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!