std_detect - Rust
Description: Run-time feature detection for the Rust standard library.

## 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:

- `x86` and `x86_64`: `is_x86_feature_detected`
- `arm`: `is_arm_feature_detected`
- `aarch64`: `is_aarch64_feature_detected`
- `riscv`: `is_riscv_feature_detected`
- `mips`: `is_mips_feature_detected`
- `mips64`: `is_mips64_feature_detected`
- `powerpc`: `is_powerpc_feature_detected`
- `powerpc64`: `is_powerpc64_feature_detected`
- `loongarch`: `is_loongarch_feature_detected`
- `s390x`: `is_s390x_feature_detected`

## Macros§

detect_featureExperimental
is_aarch64_feature_detectedExperimentalAArch64 or `target_arch=arm64ec`
  Check for the presence of a CPU feature at runtime.
is_arm_feature_detectedExperimentalARM
  Check for the presence of a CPU feature at runtime.
is_loongarch_feature_detectedExperimentalLoongArch LA32 or LoongArch LA64
  Check for the presence of a CPU feature at runtime.
is_mips64_feature_detectedExperimentalMIPS-64
  Check for the presence of a CPU feature at runtime.
is_mips_feature_detectedExperimentalMIPS
  Check for the presence of a CPU feature at runtime.
is_powerpc64_feature_detectedExperimentalPowerPC-64
  Check for the presence of a CPU feature at runtime.
is_powerpc_feature_detectedExperimentalPowerPC
  Check for the presence of a CPU feature at runtime.
is_riscv_feature_detectedExperimentalRISC-V RV32 or RISC-V RV64
  Check for the presence of a CPU feature at runtime.
is_s390x_feature_detectedExperimentals390x
  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.