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
Forward a literal to the relevant __is_feature_detected function.
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_mips_feature_detectedExperimentalNeither MIPS nor MIPS release 6 nor MIPS-64 nor MIPS-64 release 6
Check for the presence of a CPU feature at runtime.
is_powerpc_feature_detectedExperimentalNeither PowerPC nor PowerPC64
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.