Open sthornington opened 3 weeks ago
This repository basically shows your second use case, or calling an extension module written in rust from python. The extension-module
feature flag is declared in Cargo.toml
file and translated by rules_rust crate_universe system.
I don't have any experience with your first use case. I suspect that it won't be easy with bazel and might require some runfiles hacks.
I think I got it working by using the extension-module feature but then in my rust binary that needed to host a Python plugin, linking in the Python toolchain cc deps manually. But I am not confident that it’s all correct and linking to the right things yet…
Hi! Thanks for all your work on this. Could you point me to an example of using these rules to:
I'm having some difficulty doing both in the same build since crate_universe wants to make the union of the pyo3 features, and if I am not mistaken, the former needs pyo3 without
extension-module
and the latter needs it withextension-module
?