Skip to content
Discussion options

You must be logged in to vote

Nanobind doesn't support this kind of advanced use case out of the box. There are currently no type casters that somehow preserve metadata when going from an argument to a return value.

My suggestion would be that you look into making your own type caster to encapsulate this logic so that you don't have to write it over and over again. If you are never mixing frameworks in a single function call, it might be easiest to store the needed framework type in a global variable or TLS variable.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@wjakob
Comment options

Answer selected by RaulPPelaez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants