pub struct ArchSpec {Show 16 fields
pub token: &'static str,
pub spellings: &'static [&'static str],
pub targets: &'static [&'static str],
pub pointer_width: PointerWidth,
pub max_int_register_bits: u32,
pub endianness: Endianness,
pub va_list: VaListAbi,
pub stack_alignment_at_call: usize,
pub honors_argument_alignment: bool,
pub output_artifact: OutputArtifact,
pub hosted_environment: TargetEnvironment,
pub environments: &'static [TargetEnvironment],
pub interpreters: LinuxInterpreters,
pub toolchain: ToolchainTriples,
pub msvc_library_arch: Option<&'static str>,
pub variants: VariantAxis,
}Expand description
Everything an architecture states about itself.
Read it through crate::Target::spec, which applies the variant’s refinements;
TargetArchitecture::spec is the unrefined form the table states.
Fields§
§token: &'static strCanonical spelling, the one Display writes.
spellings: &'static [&'static str]Further spellings FromStr accepts for this architecture.
targets: &'static [&'static str]Target strings this architecture contributes to the supported-target list.
pointer_width: PointerWidth§max_int_register_bits: u32Widest integer one register holds. Not the pointer width: wasm32 has 32-bit pointers and 64-bit integer registers.
endianness: Endianness§va_list: VaListAbiSize and alignment of this architecture’s C va_list.
stack_alignment_at_call: usizeAlignment the stack pointer holds at a call. 1 means there is no machine stack.
honors_argument_alignment: boolWhether an argument with 16-byte alignment starts at its own alignment rather than at the next word. AAPCS64 rounds the integer register counter up to even before such an argument; the riscv psABI makes that rule variadic-only and ppc64 does not round for named arguments either.
output_artifact: OutputArtifact§hosted_environment: TargetEnvironmentEnvironment a hosted target of this architecture means when the target string names none.
environments: &'static [TargetEnvironment]Environments a target string may name for this architecture, beside
TargetEnvironment::Freestanding, which every architecture accepts.
interpreters: LinuxInterpreters§toolchain: ToolchainTriples§msvc_library_arch: Option<&'static str>Directory name under the Windows SDK Lib tree. None means Windows has no
library layout for this architecture, and asking for one is an error rather than
a search of the x86_64 directories.
variants: VariantAxisThe sub-architecture axis this architecture has, and its default.
Implementations§
Source§impl ArchSpec
impl ArchSpec
pub const fn data_layout(&self) -> TargetDataLayout
pub const fn has_64bit_int_registers(&self) -> bool
Sourcepub const fn interpreter(
&self,
environment: TargetEnvironment,
) -> Option<&'static str>
pub const fn interpreter( &self, environment: TargetEnvironment, ) -> Option<&'static str>
The ELF interpreter for an environment, or None when there is none.
Sourcepub const fn toolchain_triple(
&self,
environment: TargetEnvironment,
) -> Option<&'static str>
pub const fn toolchain_triple( &self, environment: TargetEnvironment, ) -> Option<&'static str>
The cross-toolchain triple for an environment.
Sourcepub fn accepts_environment(&self, environment: TargetEnvironment) -> bool
pub fn accepts_environment(&self, environment: TargetEnvironment) -> bool
Whether a target string may name this environment for this architecture.