pub struct Target { /* private fields */ }
Expand description
The part of the current platform that is relevant when building wheels and is supported
Implementations
sourceimpl Target
impl Target
sourcepub fn from_target_triple(target_triple: Option<String>) -> Result<Self>
pub fn from_target_triple(target_triple: Option<String>) -> Result<Self>
Uses the given target triple or tries the guess the current target by using the one used for compilation
Fails if the target triple isn’t supported
sourcepub fn get_platform_tag(
&self,
platform_tag: PlatformTag,
universal2: bool
) -> Result<String>
pub fn get_platform_tag(
&self,
platform_tag: PlatformTag,
universal2: bool
) -> Result<String>
Returns the platform part of the tag for the wheel name
sourcepub fn get_python_arch(&self) -> &str
pub fn get_python_arch(&self) -> &str
Returns the name python uses in sys.platform
for this architecture.
sourcepub fn get_python_os(&self) -> &str
pub fn get_python_os(&self) -> &str
Returns the name python uses in sys.platform
for this os
sourcepub fn get_minimum_manylinux_tag(&self) -> PlatformTag
pub fn get_minimum_manylinux_tag(&self) -> PlatformTag
Returns the oldest possible Manylinux tag for this architecture
sourcepub fn pointer_width(&self) -> usize
pub fn pointer_width(&self) -> usize
Returns whether the platform is 64 bit or 32 bit
sourcepub fn target_triple(&self) -> &str
pub fn target_triple(&self) -> &str
Returns target triple string
sourcepub fn target_arch(&self) -> Arch
pub fn target_arch(&self) -> Arch
Returns target architecture
sourcepub fn target_env(&self) -> Environment
pub fn target_env(&self) -> Environment
Returns target environment
sourcepub fn is_freebsd(&self) -> bool
pub fn is_freebsd(&self) -> bool
Returns true if the current platform is freebsd
sourcepub fn is_windows(&self) -> bool
pub fn is_windows(&self) -> bool
Returns true if the current platform is windows
sourcepub fn is_illumos(&self) -> bool
pub fn is_illumos(&self) -> bool
Returns true if the current platform is illumos
sourcepub fn is_musl_target(&self) -> bool
pub fn is_musl_target(&self) -> bool
Returns true if the current platform’s target env is Musl
sourcepub fn cross_compiling(&self) -> bool
pub fn cross_compiling(&self) -> bool
Is cross compiling for this target
Returns the tags for the WHEEL file for cffi wheels
sourcepub fn get_venv_python(&self, venv_base: impl AsRef<Path>) -> PathBuf
pub fn get_venv_python(&self, venv_base: impl AsRef<Path>) -> PathBuf
Returns the path to the python executable inside a venv
sourcepub fn get_venv_bin_dir(&self, venv_base: impl AsRef<Path>) -> PathBuf
pub fn get_venv_bin_dir(&self, venv_base: impl AsRef<Path>) -> PathBuf
Returns the directory where the binaries are stored inside a venv
sourcepub fn get_venv_site_package(
&self,
venv_base: impl AsRef<Path>,
interpreter: &PythonInterpreter
) -> PathBuf
pub fn get_venv_site_package(
&self,
venv_base: impl AsRef<Path>,
interpreter: &PythonInterpreter
) -> PathBuf
Returns the site-packages directory inside a venv e.g. {venv_base}/lib/python{x}.{y} on unix or {venv_base}/Lib on window
sourcepub fn get_python(&self) -> PathBuf
pub fn get_python(&self) -> PathBuf
Returns the path to the python executable
For windows it’s always python.exe for unix it’s first the venv’s python
and then python3
Returns the tags for the platform without python version
Trait Implementations
impl Eq for Target
impl StructuralEq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
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
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcefn clone_into(&self, target: &mut T)
fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more
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