pub struct Target { /* private fields */ }
Expand description
The part of the current platform that is relevant when building wheels and is supported
Implementations§
source§impl 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_arch(&self) -> Result<String>
pub fn get_platform_arch(&self) -> Result<String>
Returns the platform architecture
sourcepub fn get_platform_release(&self) -> Result<String>
pub fn get_platform_release(&self) -> Result<String>
Returns the platform release
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 as string
sourcepub fn host_triple(&self) -> &str
pub fn host_triple(&self) -> &str
Returns host triple as 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_emscripten(&self) -> bool
pub fn is_emscripten(&self) -> bool
Returns true if the current platform is Emscripten
sourcepub fn is_musl_libc(&self) -> bool
pub fn is_musl_libc(&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
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_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
Trait Implementations§
source§impl PartialEq for Target
impl PartialEq for Target
impl Eq for Target
impl StructuralPartialEq for Target
Auto Trait Implementations§
impl Freeze for Target
impl RefUnwindSafe for Target
impl Send for Target
impl Sync for Target
impl Unpin for Target
impl UnwindSafe for Target
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key
and return true
if they are equal.