I’ve successfully created Ruby-C++ bindings in the past using SWIG where the C++ code was compiled as a dynamic library with the Ruby script connecting to it.
However, I’d like to do it the other way around. Create an executable using C++ and enable it to load and execute Ruby code. Ruby should be able to call functions defined on the C++ side as well (naturally, otherwise all I would need is the ‘system()’ call.)
Does SWIG provide the means to achieve this?
You may be interested in Ruby embedded into c++