[−][src]Crate maturin
Builds wheels from a crate that exposes python bindings through pyo3
The high-level api is BuildOptions, which can be converted into the BuildContext, which then uses compile() and builds the appropriate wheels.
Cargo features
Default features: auditwheel, log, upload, rustls
-
auditwheel: Reimplements the more important part of the auditwheel package in rust. A wheel is checked by default, unless deactivated by cli arguments
-
log: Configures pretty-env-logger, even though maturin doesn't use logging itself.
-
upload: Uses reqwest to add the upload command.
-
rustls: Makes reqwest use the rustls stack so that we can build maturin in a cent os 5 docker container and which maturin itself manylinux compliant.
-
password-storage (off by default): Uses the keyring package to store the password. keyring pulls in a lot of shared libraries and outdated dependencies, so this is off by default, except for the build on the github releases page. (https://github.com/hwchen/secret-service-rs/issues/9)
-
human-panic (off by default): Adds human-panic, pulling in some outdated dependencies (https://github.com/rust-clique/human-panic/pull/47)
Structs
BuildContext | Contains all the metadata required to build the crate |
BuildOptions | High level API for building wheels from a crate which is also used for the CLI |
CargoToml | Extract of the Cargo.toml that can be reused for the python metadata |
Metadata21 | Python Package Metadata 2.1 as specified in https://packaging.python.org/specifications/core-metadata/ |
PathWriter | A ModuleWriter that adds the module somewhere in the filesystem, e.g. in a virtualenv |
PythonInterpreter | The location and version of an interpreter |
Registry | A pip registry such as pypi or testpypi with associated credentials, used for uploading wheels |
SDistWriter | Creates a .tar.gz archive containing the source distribution |
Target | The part of the current platform that is relevant when building wheels and is supported |
WheelMetadata | The metadata required to generate the .dist-info directory |
WheelWriter | A glorified zip builder, mostly useful for writing the record file of a wheel |
Enums
AuditWheelError | Error raised duing auditing an elf file for manylinux compatibility |
BridgeModel | The way the rust code is used in the wheel |
Manylinux | Decides how to handle manylinux compliance |
UploadError | Error type for different types of errors that can happen when uploading a wheel. |
Traits
ModuleWriter | Allows writing the module to a wheel or add it directly to the virtualenv |
Functions
auditwheel_rs | An (incomplete) reimplementation of auditwheel, which checks elf files for manylinux compliance. Returns an error for non compliant elf files |
compile | Builds the rust crate into a native module (i.e. an .so or .dll) for a specific python version. Returns a mapping from crate type (e.g. cdylib) to artifact location. |
develop | Installs a crate by compiling it and copying the shared library to the right directory |
get_pyproject_toml | Returns the contents of a pyproject.toml with a |
source_distribution | Creates a source distribution |
upload | Uploads a single wheel to the registry |
write_dist_info | Creates the .dist-info directory and fills it with all metadata files except RECORD |