-
I am trying to port my library SimSiPM from Pybind11 to nanobind. I am able to compile it if i put all class definitions in a single wrapper file. Nevertheless I find much more elegant to separate each class wrapper in a different file and call all the methods for wrapping in a "main" file as I used to do in Pybind11. Also in Pybind11 documentation it is stated that this should speed up compilation time I guess due to parallelization of compile jobs. The part that is blocking me in doing so is that the nanobind corresponding class of py::module is missing. // #inlcude...
void SiPMPropertiesPy(py::module&);
void SiPMAnalogSignalPy(py::module&);
void SiPMDigitalSignalPy(py::module&);
void SiPMDebugInfoPy(py::module&);
void SiPMHitPy(py::module&);
void SiPMSensorPy(py::module&);
void SiPMRandomPy(py::module&);
PYBIND11_MODULE(SiPM, m) {
m.doc() = "Module for SiPM simulation";
m.attr("__version__") = SIPM_VERSION;
SiPMPropertiesPy(m);
SiPMAnalogSignalPy(m);
SiPMDigitalSignalPy(m);
SiPMDebugInfoPy(m);
SiPMHitPy(m);
SiPMSensorPy(m);
SiPMRandomPy(m);
} Where each of the Am I missing something here? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
maybe |
Beta Was this translation helpful? Give feedback.
maybe
void ClassPy(nb::module_&)
?