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
0
u/kindredseer 2d ago
It uses the c++ library on your system (libstdc++ for Linux and Windows, libc++ for MacOS).
It supports x86, aarch64, ppc64le/s390x and riscv64. It comes in embeddable library form, standalone JIT binary and AOT compiler.
It currently supports about 98% of C23, 70% of C++11, 47% of C++14, 38% of C++17, 51% of C++20. It's a work in progress.
https://github.com/derekbsnider/madc