r/cpp • • Sep 18 '26

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.

6 Upvotes

92 comments sorted by

View all comments

2

u/Delicious_Fault_6912 Sep 23 '26

There are projects that do this. Much of CERN''s data analysis software is built on the ROOT library https://github.com/root-project/root, which includes a llvm-backed jit compiler for c++. It also uses that same compiler to generate python bindings to ROOT dynamically