ligverd/sqbinding ? reverse-engineered prompt
Reverse engineered prompt
Build me a small C++11 library that makes it easy to use the Squirrel scripting language from C++. I want to be able to create one or more script VMs, bind free functions, lambdas, class methods, constructors, properties, and overloaded functions, then call Squirrel code from C++ and C++ code from Squirrel with a very similar style on both sides.
It should feel lightweight, with no macros and no extra dependencies besides STL and Squirrel. Please include support for smart pointers, inheritance, optional arguments, tables and arrays, custom type conversion, and binding C++ operators to Squirrel metamethods. Also make it easy to run scripts from a string or a file, and to work with an already existing Squirrel VM.
Set it up so it builds cleanly with CMake, and if needed, look up the current Squirrel docs online so the integration is correct. Include a couple of simple examples showing the round trip between C++ and Squirrel.
Are you gonna build this?
make sure you review the code using coderabbit