Skip to main content

devela/sys/arch/namespace/
mod.rs

1// devela::sys::arch::namespace
2//
3//! Defines the [`Arch`] namespace.
4//
5
6#[cfg_attr(nightly_doc, doc(cfg(feature = "unsafe_hint")))]
7#[cfg(all(not(feature = "safe_sys"), feature = "unsafe_hint"))]
8mod instructions; // architecture-specific instructions
9
10#[cfg(feature = "dep_safe_arch")]
11mod dep_safe_arch;
12
13#[doc = crate::_tags!(platform namespace)]
14/// Arch-related functionality.
15///
16/// > If you are on this architecture, here is what the CPU itself can do.
17///
18/// # Methods
19/// - Architecture-specific instructions
20///   - [Portable abstractions](#portable-abstractions-over-architecture-dependent-instructions)
21///   - [x86 or x86_64 instructions](#x86-or-x86_64-instructions)
22///   - [arm instructions](#arm-instructions)
23///   - [AArch64 instructions](#aarch64-instructions)
24///   - [riscv instructions](#riscv-instructions)
25/// - Implementations that depend on: `dep_safe_arch`, (`x86` or `x86_64`)
26/// and some target feature:
27///   - [none](#functions-not-requiring-any-target-feature).
28///   - [`adx`](#functions-requiring-the-adx-target-feature).
29///   - [`aes`](#functions-requiring-the-aes-target-feature).
30///   - [`avx`](#functions-requiring-the-avx-target-feature).
31///   - [`avx2`](#functions-requiring-the-avx2-target-feature).
32///   - [`bmi1`](#functions-requiring-the-bmi1-target-feature).
33///   - [`bmi2`](#functions-requiring-the-bmi2-target-feature).
34///   - [`fma`](#functions-requiring-the-fma-target-feature).
35///   - [`lzcnt`](#functions-requiring-the-lzcnt-target-feature).
36///   - [`pclmulqdq`](#functions-requiring-the-pclmulqdq-target-feature).
37///   - [`popcnt`](#functions-requiring-the-popcnt-target-feature).
38///   - [`rdrand`](#functions-requiring-the-rdrand-target-feature).
39///   - [`rdseed`](#functions-requiring-the-rdseed-target-feature).
40///   - [`sse`](#functions-requiring-the-sse-target-feature)
41///     ([generic](#generic-functions-requiring-the-sse-target-feature)).
42///   - [`sse2`](#functions-requiring-the-sse2-target-feature).
43///   - [`sse3`](#functions-requiring-the-sse3-target-feature).
44///   - [`sse4.1`](#functions-requiring-the-sse41-target-feature).
45///   - [`sse4.2`](#functions-requiring-the-sse42-target-feature).
46///   - [`ssse3`](#functions-requiring-the-ssse3-target-feature).
47#[derive(Debug)]
48pub struct Arch;