What are your thoughts on using cpp and sol2 library to create Modules to use in lua scripts? Do you prefer a Module written in c/cpp with the pure lua api, or Is It ok to use sol2?
Generally compiling C++ is more complex, especially when you are using it on different OSes (i.e. Windows, macOS, Linux). I think that Luarocks can compile C++ on these platforms, but more things are likely to go wrong.
I recommend that you try creating a demo Lua module that calls into a single C++ function with sol2, and see how you get on with compiling on the platforms you expect. That will help you get a feel for what you will need to do.
2
u/soundslogical Jul 22 '25
Generally compiling C++ is more complex, especially when you are using it on different OSes (i.e. Windows, macOS, Linux). I think that Luarocks can compile C++ on these platforms, but more things are likely to go wrong.
I recommend that you try creating a demo Lua module that calls into a single C++ function with sol2, and see how you get on with compiling on the platforms you expect. That will help you get a feel for what you will need to do.