Replies: 1 comment
-
nanobind can't do that as of yet since compile-time reflection is not part of the C++ standard. (I think it's been discussed by the C++ standardization committee but it's safe to say that this is not going to show up in compilers for years). What you need is a binding generator -- something that parses a header file and dumps out the |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I am currently using
nanobind
for a large project where the settings for many processing functions are stored in structs. For each of those option structs I want to now generate a binding for Python (used by application developers). Nevertheless, at the moment I have the problem that I need to expose each property individually. Could we add a command such asdef_prop_rw_all
that automatically generates the bindings to all the public members of the corresponding struct or class? I could not find a way so far to automate this process. Problematically like this I need to maintain the code for the properties in two places.I did a search for similar questions but could not find anything so far. I also hope this is the right place to ask this question.
Beta Was this translation helpful? Give feedback.
All reactions