pub struct TargetSpec {
pub family: ArchFamily,
pub triple: String,
pub isa: IsaVariant,
pub mem_protection: MemProtection,
pub fpu: Option<FPUPrecision>,
}Expand description
Full target specification for multi-backend compilation
Fields§
§family: ArchFamilyArchitecture family
triple: StringLLVM-style triple (e.g. “thumbv7em-none-eabihf”)
isa: IsaVariantISA variant details
mem_protection: MemProtectionMemory protection model
fpu: Option<FPUPrecision>Floating-point unit capability (None = soft-float only)
Implementations§
Source§impl TargetSpec
impl TargetSpec
Sourcepub fn has_single_precision_fpu(&self) -> bool
pub fn has_single_precision_fpu(&self) -> bool
Returns whether this target has a single-precision FPU
Sourcepub fn has_double_precision_fpu(&self) -> bool
pub fn has_double_precision_fpu(&self) -> bool
Returns whether this target has a double-precision FPU
Source§impl TargetSpec
impl TargetSpec
Sourcepub fn cortex_m4f() -> Self
pub fn cortex_m4f() -> Self
Cortex-M4F with single-precision FPU
Sourcepub fn cortex_m7dp() -> Self
pub fn cortex_m7dp() -> Self
Cortex-M7 with double-precision FPU and 16 MPU regions
Sourcepub fn cortex_a53() -> Self
pub fn cortex_a53() -> Self
Cortex-A53 with MMU
Sourcepub fn riscv32(extensions: &str) -> Self
pub fn riscv32(extensions: &str) -> Self
RISC-V RV32IMAC with 16 PMP entries
A bare-metal RV32 profile with the given ISA extensions string (e.g.
"imac", "imc", "im", "i", "gc"). All RV32 variants share the
PMP memory-protection model and have no hardware FPU in the base profile.
pub fn riscv32imac() -> Self
Sourcepub fn cortex_m55() -> Self
pub fn cortex_m55() -> Self
Cortex-M55 with Helium MVE, single-precision FPU, TrustZone
Sourcepub fn from_triple(triple: &str) -> Result<Self, String>
pub fn from_triple(triple: &str) -> Result<Self, String>
Parse from an LLVM triple or shorthand name
Trait Implementations§
Source§impl Clone for TargetSpec
impl Clone for TargetSpec
Source§fn clone(&self) -> TargetSpec
fn clone(&self) -> TargetSpec
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TargetSpec
impl Debug for TargetSpec
Source§impl<'de> Deserialize<'de> for TargetSpec
impl<'de> Deserialize<'de> for TargetSpec
Source§fn 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>,
impl Eq for TargetSpec
Source§impl PartialEq for TargetSpec
impl PartialEq for TargetSpec
Source§fn eq(&self, other: &TargetSpec) -> bool
fn eq(&self, other: &TargetSpec) -> bool
self and other values to be equal, and is used by ==.Source§impl Serialize for TargetSpec
impl Serialize for TargetSpec
impl StructuralPartialEq for TargetSpec
Auto Trait Implementations§
impl Freeze for TargetSpec
impl RefUnwindSafe for TargetSpec
impl Send for TargetSpec
impl Sync for TargetSpec
impl Unpin for TargetSpec
impl UnsafeUnpin for TargetSpec
impl UnwindSafe for TargetSpec
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<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.