1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145
|
Build the crate into python packages
Usage: maturin[EXE] build [OPTIONS] [ARGS]...
Arguments:
[ARGS]...
Rustc flags
Options:
--strip
Strip the library for minimum file size
--sdist
Build a source distribution
--compatibility [<compatibility>...]
Control the platform tag and PyPI compatibility.
This options offers both fine-grained control over the linux libc tag and a more automatic
PyPI-compatibility option.
The `pypi` option applies on all platforms and ensure that only tags that can be uploaded
to PyPI are used. The linux-specific options are `manylinux` tags (for example
`manylinux2014`/`manylinux_2_24`) or `musllinux` tags (for example `musllinux_1_2`), and
`linux` for the native linux tag. They are ignored on non-linux platforms.
Note that `manylinux1` and `manylinux2010` are unsupported by the rust compiler. Wheels
with the native `linux` tag will be rejected by pypi, unless they are separately validated
by `auditwheel`.
The default is the lowest compatible `manylinux` tag, or plain `linux` if nothing matched.
-i, --interpreter [<INTERPRETER>...]
The python versions to build wheels for, given as the executables of interpreters such as
`python3.9` or `/usr/bin/python3.8`
-f, --find-interpreter
Find interpreters from the host machine
-b, --bindings <BINDINGS>
Which kind of bindings to use
[possible values: pyo3, pyo3-ffi, cffi, uniffi, bin]
-o, --out <OUT>
The directory to store the built wheels in. Defaults to a new "wheels" directory in the
project's target directory
--auditwheel <AUDITWHEEL>
Audit wheel for manylinux compliance
Possible values:
- repair: Audit and repair wheel for manylinux compliance
- check: Check wheel for manylinux compliance, but do not repair
- skip: Don't check for manylinux compliance
--zig
For manylinux targets, use zig to ensure compliance for the chosen manylinux version
Default to manylinux2014/manylinux_2_17 if you do not specify an `--compatibility`
Make sure you installed zig with `pip install maturin[zig]`
-q, --quiet
Do not print cargo log messages
--ignore-rust-version
Ignore `rust-version` specification in packages
-v, --verbose...
Use verbose output (-vv very verbose/build.rs output)
--color <WHEN>
Coloring: auto, always, never
--config <KEY=VALUE>
Override a configuration value (unstable)
-Z <FLAG>
Unstable (nightly-only) flags to Cargo, see 'cargo -Z help' for details
--future-incompat-report
Outputs a future incompatibility report at the end of the build (unstable)
--compression-method <COMPRESSION_METHOD>
Zip compression method. Only Stored and Deflated are currently compatible with all package
managers
[default: deflated]
Possible values:
- deflated: Deflate compression (levels 0-9, default 6)
- stored: No compression
- bzip2: BZIP2 compression (levels 0-9, default 6)
- zstd: Zstandard compression (supported from Python 3.14; levels -7-22, default 3)
--compression-level <COMPRESSION_LEVEL>
Zip compression level. Defaults to method default
-h, --help
Print help (see a summary with '-h')
Compilation Options:
-r, --release
Build artifacts in release mode, with optimizations
-j, --jobs <N>
Number of parallel jobs, defaults to # of CPUs
--profile <PROFILE-NAME>
Build artifacts with the specified Cargo profile
--target <TRIPLE>
Build for the target triple
[env: CARGO_BUILD_TARGET=]
--target-dir <DIRECTORY>
Directory for all generated artifacts
--timings=<FMTS>
Timing output formats (unstable) (comma separated): html, json
Feature Selection:
-F, --features <FEATURES>
Space or comma separated list of features to activate
--all-features
Activate all available features
--no-default-features
Do not activate the `default` feature
Manifest Options:
-m, --manifest-path <PATH>
Path to Cargo.toml
--frozen
Require Cargo.lock and cache are up to date
--locked
Require Cargo.lock is up to date
--offline
Run without accessing the network
|