Closed dan-masek closed 3 years ago
AFAIR think documentation hasn't kept up at all with any of the new features added after the original luabind. I don't know if this fork is the best place to contribute it too though, as I no longer really maintain it.
These days, I have the impression that luabind is mostly used for legacy-reasons and new projects use other binding libraries. If you need suggestions, when I did a small survey way back in 2015, lua-intf, LuaBridge, selene and OOLua seemed promising. But since then I think, among others, sol and Sol2 (https://github.com/ThePhD/sol2) emerged and might be the best current option.
By the way, I think there is a more portable way than the Windows-specific __declspec(dllexport)
, namely BOOST_SYMBOL_EXPORT
from Boost.Config.
OK, Thanks for the work you've done on your fork. I picked up luabind some 10 years ago, and at some point switched to your fork (and i might have used Ryan's one for a bit before that). So I'm one of those legacy users, and switching everything to another library is low value for effort (as long as this thing still works well enough, which is does).
Thanks for pointing out the alternatives. If I were starting now, I would have most likely gone with Sol2.
Good point about the BOOST_SYMBOL_EXPORT
... I mostly work on a single platform so this didn't come to my mind.
From what I've read (and how the standard libraries seem to generally work in recent Lua versions) directly registering things into the global table is not ideal.
In order to create something that behaves the same way while using luabind, I came up with the following pattern:
It might be beneficial to describe something like this in the documentation and perhaps have an example for it.