Skip to main content

Crate lamina_platform

Crate lamina_platform 

Source
Expand description

lamina-platform - Platform and target detection

This crate provides target architecture and operating system detection and definitions. It’s separated from the main lamina crate to avoid dependency cycles with ras and other components.

§Modules

  • arch_table - the architecture table: every property of every architecture
  • target - targets: architecture, environment, operating system and variant
  • environment - the C runtime and ABI axis
  • cpu_level - x86-64 microarchitecture levels (v1 to v4)
  • arch_variant - sub-architecture variants for the other families
  • detection - Host system detection functions
  • [simd] - SIMD capabilities detection (nightly feature)

Re-exports§

pub use arch_table::ArchSpec;
pub use arch_table::Endianness;
pub use arch_table::LinuxInterpreters;
pub use arch_table::OutputArtifact;
pub use arch_table::PointerWidth;
pub use arch_table::TargetArchitecture;
pub use arch_table::TargetDataLayout;
pub use arch_table::ToolchainTriples;
pub use arch_table::VaListAbi;
pub use arch_variant::Aarch64Level;
pub use arch_variant::ArchVariant;
pub use arch_variant::Armv7Profile;
pub use arch_variant::Armv7Variant;
pub use arch_variant::PowerLevel;
pub use arch_variant::RiscvIsa;
pub use arch_variant::VariantAxis;
pub use cpu_level::X86CpuLevel;
pub use detection::cpu_count;
pub use detection::detect_host_architecture_only;
pub use detection::detect_host_os;
pub use environment::CompilerRuntime;
pub use environment::Libc;
pub use environment::TargetEnvironment;
pub use shared::MemoryOrdering;
pub use shared::SourceLoc;
pub use shared::TlsModel;
pub use target::Target;
pub use target::TargetOperatingSystem;
pub use target::default_environment;
pub use target::host_arch_list;
pub use target::parse_arch_token;
pub use target::parse_architecture;
pub use target::target_alias_list;
pub use vector::any_vector_register_bits;

Modules§

arch_table
The architecture table: every property of every architecture, stated once.
arch_variant
Sub-architecture variants: the part of a target the bare architecture name leaves out.
cpu_level
x86-64 microarchitecture levels: the instruction-set baseline a generated binary may rely on.
detection
Host system detection functions.
environment
The C runtime and ABI a target means.
shared
Types the IR and the MIR both name, defined once so the two layers agree.
target
Targets: an architecture, an environment, an operating system and a variant.
vector
Machine vector register widths, as a property of the target rather than a constant.