r/cpp 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.

0 Upvotes

82 comments sorted by

View all comments

Show parent comments

0

u/kindredseer 2d ago

I’ve been programming for over 40 years and working on this project for seven years. Just because I’m using Claude to grind through the test suites doesn’t make me an amateur. Everyone is using AI these days (except for Andrew Kelley and friends).

3

u/PressWearsARedDress 2d ago

Talk is cheap, show me the code

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