Struct maturin::BuildOptions

source ·
pub struct BuildOptions {
    pub platform_tag: Vec<PlatformTag>,
    pub interpreter: Vec<PathBuf>,
    pub find_interpreter: bool,
    pub bindings: Option<String>,
    pub out: Option<PathBuf>,
    pub skip_auditwheel: bool,
    pub zig: bool,
    pub universal2: bool,
    pub cargo: CargoOptions,
}
Expand description

High level API for building wheels from a crate which is also used for the CLI

Fields

platform_tag: Vec<PlatformTag>

Control the platform tag on linux.

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.

Note that manylinux1 and manylinux2010 is 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

This option is ignored on all non-linux platforms

interpreter: Vec<PathBuf>

The python versions to build wheels for, given as the names of the interpreters.

find_interpreter: bool

Find interpreters from the host machine

bindings: Option<String>

Which kind of bindings to use.

out: Option<PathBuf>

The directory to store the built wheels in. Defaults to a new “wheels” directory in the project’s target directory

skip_auditwheel: bool

Don’t check for manylinux compliance

zig: bool

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]

universal2: bool

Control whether to build universal2 wheel for macOS or not. Only applies to macOS targets, do nothing otherwise.

cargo: CargoOptions

Cargo build options

Implementations

Tries to fill the missing metadata for a BuildContext by querying cargo and python

Methods from Deref<Target = CargoOptions>

Merge options from pyproject.toml

Trait Implementations

Report the ArgGroup::id for this set of arguments
Append to Command so it can instantiate Self. Read more
Append to Command so it can update self. Read more
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Build a Command that can instantiate Self. Read more
Build a Command that can update self. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
The resulting type after dereferencing.
Dereferences the value.
Mutably dereferences the value.
Deserialize this value from the given Serde deserializer. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
Assign values from ArgMatches to self.
Assign values from ArgMatches to self.
Parse from std::env::args_os(), exit on error
Parse from std::env::args_os(), return Err on error.
Parse from iterator, exit on error
Parse from iterator, return Err on error.
Update from iterator, exit on error
Update from iterator, return Err on error.
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
The number of items that this chain link consists of.
Append the elements in this link to the chain.
An iterator over the items within this container, by value.
Iterate over the elements of the container (using internal iteration because GATs are unstable).
Compare self to key and return true if they are equal.

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more