🔬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:
x86andx86_64:is_x86_feature_detectedarm:is_arm_feature_detectedaarch64:is_aarch64_feature_detectedriscv:is_riscv_feature_detectedmips:is_mips_feature_detectedmips64:is_mips64_feature_detectedpowerpc:is_powerpc_feature_detectedpowerpc64:is_powerpc64_feature_detectedloongarch:is_loongarch_feature_detecteds390x:is_s390x_feature_detected
Modules§
- detect 👻
Experimental - This module implements run-time feature detection.
Macros§
- detect_
feature Experimental - is_
aarch64_ feature_ detected Experimental Neither AArch64 nor ARM64EC - Check for the presence of a CPU feature at runtime.
- is_
arm_ feature_ detected Experimental Non-ARM - Check for the presence of a CPU feature at runtime.
- is_
loongarch_ feature_ detected Experimental Neither LoongArch32 nor LoongArch64 - Check for the presence of a CPU feature at runtime.
- is_
mips64_ feature_ detected Experimental Non-MIPS-64 - Check for the presence of a CPU feature at runtime.
- is_
mips_ feature_ detected Experimental Non-MIPS - Check for the presence of a CPU feature at runtime.
- is_
powerpc64_ feature_ detected Experimental Non-PowerPC64 - Check for the presence of a CPU feature at runtime.
- is_
powerpc_ feature_ detected Experimental Non-PowerPC - Check for the presence of a CPU feature at runtime.
- is_
riscv_ feature_ detected Experimental Neither RISC-V RV32 nor RISC-V RV64 - Check for the presence of a CPU feature at runtime.
- is_
s390x_ feature_ detected Experimental Non-s390x - Check for the presence of a CPU feature at runtime.
- is_
x86_ feature_ detected Experimental x86 or x86-64 - Check for the presence of a CPU feature at runtime.