1 //! Run-time feature detection for the Rust standard library.
3 //! To detect whether a feature is enabled in the system running the binary
4 //! use one of the appropriate macro for the target:
6 //! * `x86` and `x86_64`: [`is_x86_feature_detected`]
7 //! * `arm`: [`is_arm_feature_detected`]
8 //! * `aarch64`: [`is_aarch64_feature_detected`]
9 //! * `mips`: [`is_mips_feature_detected`]
10 //! * `mips64`: [`is_mips64_feature_detected`]
11 //! * `powerpc`: [`is_powerpc_feature_detected`]
12 //! * `powerpc64`: [`is_powerpc64_feature_detected`]
14 #![unstable(feature = "stdsimd", issue = "27731")]
15 #![feature(const_fn, staged_api, stdsimd, doc_cfg, allow_internal_unstable)]
16 #![allow(clippy::shadow_reuse)]
17 #![deny(clippy::missing_inline_in_public_items)]
18 #![cfg_attr(target_os = "linux", feature(linkage))]
19 #![cfg_attr(all(target_os = "freebsd", target_arch = "aarch64"), feature(asm))]
20 #![cfg_attr(stdsimd_strict, deny(warnings))]
21 #![cfg_attr(test, allow(unused_imports))]
28 if #[cfg(feature = "std_detect_file_io")] {
29 #[cfg_attr(test, macro_use(println))]
32 #[allow(unused_imports)]
33 use std::{arch, fs, io, mem, sync};
39 #[allow(unused_imports)]
40 use core::{arch, mem, sync};
44 #[cfg(feature = "std_detect_dlsym_getauxval")]
48 #[unstable(feature = "stdsimd", issue = "27731")]