No description
Find a file
Daniel Baumann a3fafa3a73
Releasing fastforward version 11.6.0-2~ffwd13+u1.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2026-05-17 10:32:05 +02:00
.github Merging upstream version 11.6.0. 2026-05-17 10:30:39 +02:00
debian Releasing fastforward version 11.6.0-2~ffwd13+u1. 2026-05-17 10:32:05 +02:00
examples Adding upstream version 11.2.0. 2026-05-17 10:27:45 +02:00
src Merging upstream version 11.6.0. 2026-05-17 10:30:39 +02:00
.cargo_vcs_info.json Merging upstream version 11.6.0. 2026-05-17 10:30:39 +02:00
.gitignore Adding upstream version 11.2.0. 2026-05-17 10:27:45 +02:00
AUTHORS Adding upstream version 11.2.0. 2026-05-17 10:27:45 +02:00
Cargo.lock Merging upstream version 11.6.0. 2026-05-17 10:30:39 +02:00
Cargo.toml Merging upstream version 11.6.0. 2026-05-17 10:30:39 +02:00
Cargo.toml.orig Merging upstream version 11.6.0. 2026-05-17 10:30:39 +02:00
CHANGELOG.md Adding upstream version 11.2.0. 2026-05-17 10:27:45 +02:00
LICENSE.md Adding upstream version 11.2.0. 2026-05-17 10:27:45 +02:00
README.md Adding upstream version 11.2.0. 2026-05-17 10:27:45 +02:00

cpuid Crates.io Standard checks

A library to parse the x86 CPUID instruction, written in rust with no external dependencies. The implementation closely resembles the Intel CPUID manual description. The library works in no_std environments. Some additional cargo features require std (e.g., pretty printing, serialization).

  • For Intel platforms: The code should be in sync with the March 2018 revision of the Intel Architectures SDM.
  • For AMD platforms it should be in sync with the AMD64 systems manual no. 24594, Revision 3.32 (March 2021).

Library usage

use raw_cpuid::CpuId;
let cpuid = CpuId::new();

if let Some(vf) = cpuid.get_vendor_info() {
    assert!(vf.as_str() == "GenuineIntel" || vf.as_str() == "AuthenticAMD");
}

let has_sse = cpuid.get_feature_info().map_or(false, |finfo| finfo.has_sse());
if has_sse {
    println!("CPU supports SSE!");
}

if let Some(cparams) = cpuid.get_cache_parameters() {
    for cache in cparams {
        let size = cache.associativity() * cache.physical_line_partitions() * cache.coherency_line_size() * cache.sets();
        println!("L{}-Cache size is {}", cache.level(), size);
    }
} else {
    println!("No cache parameter information available")
}

cpuid binary

raw-cpuid ships with a cpuid binary that can be installed to inspect the output of the CPUID instruction on a host system.

To install, use:

cargo install raw-cpuid --features cli

The cli feature is currently required to build the binary version due to cargo limitations.

Documentation