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
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. Uses autodiscovery if not explicitly set.
find_interpreter: bool
Find interpreters from the host machine
bindings: Option<String>
Which kind of bindings to use. Possible values are pyo3, rust-cpython, cffi and bin
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 manylinux2010/manylinux_2_12 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
sourceimpl BuildOptions
impl BuildOptions
sourcepub fn into_build_context(
self,
release: bool,
strip: bool,
editable: bool
) -> Result<BuildContext>
pub fn into_build_context(
self,
release: bool,
strip: bool,
editable: bool
) -> Result<BuildContext>
Tries to fill the missing metadata for a BuildContext by querying cargo and python
Trait Implementations
sourceimpl Args for BuildOptions
impl Args for BuildOptions
sourceimpl Clone for BuildOptions
impl Clone for BuildOptions
sourcefn clone(&self) -> BuildOptions
fn clone(&self) -> BuildOptions
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl CommandFactory for BuildOptions
impl CommandFactory for BuildOptions
sourcefn into_app_for_update<'b>() -> Command<'b>
fn into_app_for_update<'b>() -> Command<'b>
Deprecated, replaced with CommandFactory::command_for_update
sourcefn command_for_update<'help>() -> App<'help>
fn command_for_update<'help>() -> App<'help>
sourceimpl Debug for BuildOptions
impl Debug for BuildOptions
sourceimpl Default for BuildOptions
impl Default for BuildOptions
sourcefn default() -> BuildOptions
fn default() -> BuildOptions
Returns the “default value” for a type. Read more
sourceimpl Deref for BuildOptions
impl Deref for BuildOptions
type Target = CargoOptions
type Target = CargoOptions
The resulting type after dereferencing.
sourceimpl DerefMut for BuildOptions
impl DerefMut for BuildOptions
sourceimpl<'de> Deserialize<'de> for BuildOptions where
BuildOptions: Default,
impl<'de> Deserialize<'de> for BuildOptions where
BuildOptions: Default,
sourcefn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error> where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
sourceimpl FromArgMatches for BuildOptions
impl FromArgMatches for BuildOptions
sourcefn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>
Instantiate Self
from ArgMatches
, parsing the arguments as needed. Read more
sourcefn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
fn from_arg_matches_mut(
__clap_arg_matches: &mut ArgMatches
) -> Result<Self, Error>
Instantiate Self
from ArgMatches
, parsing the arguments as needed. Read more
sourcefn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches(
&mut self,
__clap_arg_matches: &ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches
to self
.
sourcefn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
fn update_from_arg_matches_mut(
&mut self,
__clap_arg_matches: &mut ArgMatches
) -> Result<(), Error>
Assign values from ArgMatches
to self
.
sourceimpl Parser for BuildOptions
impl Parser for BuildOptions
sourcefn parse_from<I, T>(itr: I) -> Self where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn parse_from<I, T>(itr: I) -> Self where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, exit on error
sourcefn try_parse_from<I, T>(itr: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_parse_from<I, T>(itr: I) -> Result<Self, Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Parse from iterator, return Err on error.
sourcefn update_from<I, T>(&mut self, itr: I) where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn update_from<I, T>(&mut self, itr: I) where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, exit on error
sourcefn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error> where
I: IntoIterator<Item = T>,
T: Into<OsString> + Clone,
Update from iterator, return Err on error.
sourceimpl PartialEq<BuildOptions> for BuildOptions
impl PartialEq<BuildOptions> for BuildOptions
sourcefn eq(&self, other: &BuildOptions) -> bool
fn eq(&self, other: &BuildOptions) -> bool
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
sourcefn ne(&self, other: &BuildOptions) -> bool
fn ne(&self, other: &BuildOptions) -> bool
This method tests for !=
.
sourceimpl Serialize for BuildOptions
impl Serialize for BuildOptions
impl Eq for BuildOptions
impl StructuralEq for BuildOptions
impl StructuralPartialEq for BuildOptions
Auto Trait Implementations
impl RefUnwindSafe for BuildOptions
impl Send for BuildOptions
impl Sync for BuildOptions
impl Unpin for BuildOptions
impl UnwindSafe for BuildOptions
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
impl<T> Pointable for T
impl<T> Pointable for T
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
fn vzip(self) -> V
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self> where
S: Into<Dispatch>,
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>
fn with_current_subscriber(self) -> WithDispatch<Self>
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more