r/cpp • u/_bstaletic • Jun 21 '26
Pymetabind: Writing pybind11 bindings with C++26 reflections
https://codeberg.org/bstaletic/pymetabind/
81
Upvotes
r/cpp • u/_bstaletic • Jun 21 '26
View all comments
5
u/holyblackcat Jun 21 '26
I made something similar but with libclang and code generation: https://github.com/MeshInspector/mrbind
My advice is to try nanobind instead of pybind (if it's not too late :P), to be able to do stable-api builds (not locked to a single minor Python version). The lack of virtual inheritance can be worked around.
Secondly, at least in pybind, you'll be surprised how many types have broken default behavior. Try passing
int *as a function parameter, for example.