Mirror Bridge
Modern C++ meets Multiple Languages: Automatic bindings using C++26 reflection - zero boilerplate, pure compile-time magic.
⚠️ EXPERIMENTAL: This project requires C++26 reflection (P2996), which is not yet standardized. It only works with Bloomberg's clang-p2996 fork. Not recommended for production use until P2996 lands in standard C++26.
One C++ Class, Three Languages
// Write your C++ code once struct Calculator { double value = 0.0 ; double add ( double x) { return value += x; } double subtract ( double x) { return value -= x; } };
Python:
import cpp_calc calc = cpp_calc . Calculator () calc . add ( 10 ) calc . subtract ( 3 ) print ( calc . value ) # 7.0
JavaScript (Node.js):
const calc = new addon . Calculator ( ) ; calc . add ( 10 ) ; calc . subtract ( 3 ) ; console . log ( calc . x ) ; // 7.0
Lua:
... continue reading