Skip to main content

Crate rypip

Crate rypip 

Source
Expand description

rypip: a pip-like tool for the rython toolchain.

rypip builds Python packages as native Rust binaries and installs them where cargo installs binaries (cargo install’s root, normally ~/.cargo/bin), and converts Python packages into Rust crates — optionally with PyO3 bindings so the converted crate can still be imported from Python.

Re-exports§

pub use convert::convert;
pub use convert::ConvertOptions;
pub use convert::ConvertedCrate;
pub use package::discover;
pub use package::PyPackage;

Modules§

convert
Conversion of a discovered Python package into a Cargo crate: one Rust module per Python module, an optional binary entry point, and optional PyO3 bindings so the crate can be imported from Python again.
package
Discovery of Python packages on disk: locating the source modules and reading package metadata (name, version) from pyproject.toml when present.

Functions§

cargo_build
Run cargo build --release on a converted crate.
cargo_install
Install a converted crate’s binary the same way cargo install would (into $CARGO_INSTALL_ROOT/~/.cargo/bin unless root overrides it).