You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Having used the Python generated bindings successfully, I've now reached the point of packaging them and uploading to PyPi, though unfortunately this is quite the ordeal. The reason for that is that when using rust-cpython we are building real python modules written in Rust (no Python code) which have some annoying implications:
You can't inherit from classes. I wanted to add some Python specific sugar on top some of the classes and it doesn't seem to be possible.
Packaging is absolutely hell - when using rust-cypthon your built module is specific to the minor Python version in addition to the Arch. This means that you have to build it for every combination of OS, Arch and Python version, which is insane (and not too easy to set up in CI).
Idea: maybe let's use the generated C API that we already have in the C++ backend and just generate a python module to wrap around it using the python ffi library. This will make the build matrix less insane.
I'm not sure whether it's a good idea or not. I'm just putting this out there for some discussion.
The text was updated successfully, but these errors were encountered:
Having used the Python generated bindings successfully, I've now reached the point of packaging them and uploading to PyPi, though unfortunately this is quite the ordeal. The reason for that is that when using
rust-cpython
we are building real python modules written in Rust (no Python code) which have some annoying implications:rust-cypthon
your built module is specific to the minor Python version in addition to the Arch. This means that you have to build it for every combination of OS, Arch and Python version, which is insane (and not too easy to set up in CI).Idea: maybe let's use the generated C API that we already have in the C++ backend and just generate a python module to wrap around it using the python ffi library. This will make the build matrix less insane.
I'm not sure whether it's a good idea or not. I'm just putting this out there for some discussion.
The text was updated successfully, but these errors were encountered: