Skip to main content

Crate std_detect

Crate std_detect 

Source
🔬This is a nightly-only experimental API. (stdarch_internal)
Expand description

Run-time feature detection for the Rust standard library.

To detect whether a feature is enabled in the system running the binary use one of the appropriate macro for the target:

Modules§

detect 👻 Experimental
This module implements run-time feature detection.

Macros§

detect_featureExperimental
is_aarch64_feature_detectedExperimentalNeither AArch64 nor ARM64EC
Check for the presence of a CPU feature at runtime.
is_arm_feature_detectedExperimentalNon-ARM
Check for the presence of a CPU feature at runtime.
is_loongarch_feature_detectedExperimentalNeither LoongArch32 nor LoongArch64
Check for the presence of a CPU feature at runtime.
is_mips64_feature_detectedExperimentalNon-MIPS-64
Check for the presence of a CPU feature at runtime.
is_mips_feature_detectedExperimentalNon-MIPS
Check for the presence of a CPU feature at runtime.
is_powerpc64_feature_detectedExperimentalNon-PowerPC64
Check for the presence of a CPU feature at runtime.
is_powerpc_feature_detectedExperimentalNon-PowerPC
Check for the presence of a CPU feature at runtime.
is_riscv_feature_detectedExperimentalNeither RISC-V RV32 nor RISC-V RV64
Check for the presence of a CPU feature at runtime.
is_s390x_feature_detectedExperimentalNon-s390x
Check for the presence of a CPU feature at runtime.
is_x86_feature_detectedExperimentalx86 or x86-64
Check for the presence of a CPU feature at runtime.