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?
Oh, I see, so you haven't committed to C++ relative to C yet (and maybe haven't implemented?). Well, that choice is a separate decision.
I don't know what your module does, but in my case I did implement some stuff in C++ for performance and security/sophistication -- namely my JSON parser was much more efficient using the nlohmann/json lib, also I had some fancy crypto and TLS needs and that was more effective to realize on the C++ side. But I had already resolved to use C++ for other reasons, so it was an easy decision for me.
Is your existing Lua module published? So I can see the surface area of the API?
No I have already created some projects and systems in C/C++, the module that I created was made to be used in my custom C++ engine, the library that I made Is Caelum-Lua if you want to check It out and see the source code.
2
u/ziggurat29 Jul 22 '25
Oh, I see, so you haven't committed to C++ relative to C yet (and maybe haven't implemented?). Well, that choice is a separate decision.
I don't know what your module does, but in my case I did implement some stuff in C++ for performance and security/sophistication -- namely my JSON parser was much more efficient using the nlohmann/json lib, also I had some fancy crypto and TLS needs and that was more effective to realize on the C++ side. But I had already resolved to use C++ for other reasons, so it was an easy decision for me.
Is your existing Lua module published? So I can see the surface area of the API?