r/cpp • u/holyblackcat • Apr 02 '26
Announcing mrbind, an automatic C/C#/Python binding generator for C++
https://holyblackcat.github.io/blog/2026/04/02/announcing-mrbind.html
30
Upvotes
r/cpp • u/holyblackcat • Apr 02 '26
View all comments
Show parent comment
2
u/holyblackcat Apr 02 '26
Python was the first backend, and the code quality there isn't the best, so I'll probably write the embind backend from scratch. There might enough differences to warrant a fresh implementation anyway, a surprising about of special-casing goes into each new language.
It's not my choice what languages I'm paid to add, so Java probably won't get added any time soon. :P
I wonder if it's going to cover my usecases. It's ok for pybind/embind, where the functions are registered at runtime. But C/C# requires codegen, and I'm not sure I want to compile a C++ program just to generate C/C# code. It would make cross-compilation more difficult too.
Custom parsers can work for simple cases, but IMO anything other than libclang is ultimatly a dead end. Custom parsers are going to choke on advanced C++ features.