#[non_exhaustive]pub struct Platform {
pub target_triple: &'static str,
pub target_arch: Arch,
pub target_os: OS,
pub target_env: Env,
pub target_pointer_width: PointerWidth,
pub target_endian: Endian,
pub tier: Tier,
}Expand description
Rust platforms supported by mainline rustc
Sourced from https://doc.rust-lang.org/nightly/rustc/platform-support.html
as well as the latest nightly version of rustc
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.target_triple: &'static str“Target triple” string uniquely identifying the platform. See: https://github.com/rust-lang/rfcs/blob/master/text/0131-target-specification.md
These are defined in the rustc_target crate of the Rust compiler:
https://github.com/rust-lang/rust/blob/master/src/librustc_target/spec/mod.rs
target_arch: ArchTarget architecture cfg attribute (i.e. cfg(target_arch))
target_os: OSTarget OS cfg attribute (i.e. cfg(target_os)).
target_env: EnvTarget environment cfg attribute (i.e. cfg(target_env)).
Only used when needed for disambiguation, e.g. on many GNU platforms
this value will be None.
target_pointer_width: PointerWidthTarget pointer width cfg attribute, in bits (i.e. cfg(target_pointer_width)).
Typically 64 on modern platforms, 32 on older platforms, 16 on some microcontrollers.
target_endian: EndianTarget endianness cfg attribute (i.e. cfg(target_endian)).
Set to “little” on the vast majority of modern platforms.
tier: TierTier of this platform:
Tier::One: guaranteed to workTier::Two: guaranteed to buildTier::Three: unofficially supported with no guarantees