-
Based on #302 there doesn't seem to be any interest in adding support for interpreter embedding in nanobind. The questioner in that issue switched to using pybind11 as a solution, however I'm wondering if there's a better solution. I am considering moving an existing library that's does the embedding and binding with handwritten C API calls, to nanobind. Is it possible to do the embedding with manual C API calls and then port the binding to nanobind? Are there assumptions that nanobind makes that would make this difficult or that I need to take into consideration? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Nanobind has one global state inside the extension. This might cause problems if you spin up multiple interpreters. Other than that, doing things manually with the C API should be fine. I just do not want to support such use cases here, it is considered beyond the scope of this library. |
Beta Was this translation helpful? Give feedback.
Nanobind has one global state inside the extension. This might cause problems if you spin up multiple interpreters. Other than that, doing things manually with the C API should be fine. I just do not want to support such use cases here, it is considered beyond the scope of this library.