Skip to main content

TargetSpec

Struct TargetSpec 

Source
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: ArchFamily

Architecture family

§triple: String

LLVM-style triple (e.g. “thumbv7em-none-eabihf”)

§isa: IsaVariant

ISA variant details

§mem_protection: MemProtection

Memory protection model

§fpu: Option<FPUPrecision>

Floating-point unit capability (None = soft-float only)

Implementations§

Source§

impl TargetSpec

Source

pub fn has_single_precision_fpu(&self) -> bool

Returns whether this target has a single-precision FPU

Source

pub fn has_double_precision_fpu(&self) -> bool

Returns whether this target has a double-precision FPU

Source§

impl TargetSpec

Source

pub fn cortex_m3() -> Self

Cortex-M3 (ARMv7-M, no FPU, 8 MPU regions)

Source

pub fn cortex_m4() -> Self

Cortex-M4 with 8 MPU regions (no FPU — M4 without F suffix)

Source

pub fn cortex_m4f() -> Self

Cortex-M4F with single-precision FPU

Source

pub fn cortex_m7() -> Self

Cortex-M7 with single-precision FPU and 16 MPU regions

Source

pub fn cortex_m7dp() -> Self

Cortex-M7 with double-precision FPU and 16 MPU regions

Source

pub fn cortex_r5() -> Self

Cortex-R5 with 12 MPU regions

Source

pub fn cortex_a53() -> Self

Cortex-A53 with MMU

Source

pub fn riscv32imac() -> Self

RISC-V RV32IMAC with 16 PMP entries

Source

pub fn cortex_m55() -> Self

Cortex-M55 with Helium MVE, single-precision FPU, TrustZone

Source

pub fn from_triple(triple: &str) -> Result<Self, String>

Parse from an LLVM triple or shorthand name

Source

pub fn has_fpu(&self) -> bool

Whether this target has a floating-point unit

Source

pub fn is_thumb2(&self) -> bool

Whether this target uses Thumb-2 encoding (Cortex-M)

Trait Implementations§

Source§

impl Clone for TargetSpec

Source§

fn clone(&self) -> TargetSpec

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TargetSpec

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for TargetSpec

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for TargetSpec

Source§

fn eq(&self, other: &TargetSpec) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for TargetSpec

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl Eq for TargetSpec

Source§

impl StructuralPartialEq for TargetSpec

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Compare self to key and return true if they are equal.
Source§

impl<Q, K> Equivalent<K> for Q
where Q: Eq + ?Sized, K: Borrow<Q> + ?Sized,

Source§

fn equivalent(&self, key: &K) -> bool

Checks if this value is equivalent to the given key. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,