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).

Library usage

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

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

let hassse = cpuid.getfeatureinfo().mapor(false, |finfo| finfo.hassse()); if hassse { println!("CPU supports SSE!"); }

if let Some(cparams) = cpuid.getcacheparameters() { for cache in cparams { let size = cache.associativity() * cache.physicallinepartitions() * cache.coherencylinesize() * 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:

bash cargo install raw-cpuid --features cli

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

Documentation