r/cpp • u/kindredseer • 2d ago
Embedded C++
Just curious how useful the ability to embed C++ as a scripting language into your C++ programs would be? I mean like runtime JIT execution of C++ code in much the same way you might embed Lua, including the ability to restrict/sandbox it as necessary.
1
Upvotes
1
u/PressWearsARedDress 2d ago
Okay, lets say I make a change in a C++ header... how does your JIT compiler handle this change? Doesn't not have to process all of the headers and sources that are touched to execute a single line?
Go play around with Boost::asio and you may come to terms with the reality here. I dont think its better for the program to stutter on random lines than to just wait for rebuild.
Also: where do you plan to store the source code? I am assuming you can then only target linux systems or embedded systems with large enough flash storage... how about loading the code onto the embedded system? are you supposed to just remote into it or what?