Registry / utility / raw-cpuid

raw-cpuid

JSON →
library11.6.0rscratesunverified

Parses the x86 CPUID instruction output, providing detailed information about CPU features and capabilities without external dependencies.

# Cargo.toml [dependencies] raw-cpuid = "11.6.0"
INSTALL
IMPORT
SIG · RAW-CPUID
R
raw-cpuid
utilityrustv11.6.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

CpuId
use raw_cpuid::CpuId;

Queries CPU vendor and checks for SSE2 support using raw_cpuid.

use raw_cpuid::CpuId; fn main() { let cpuid = CpuId::new(); if let Some(vendor) = cpuid.get_vendor_info() { println!("CPU vendor: {}", vendor); } if let Some(features) = cpuid.get_feature_info() { println!("SSE2: {}", features.has_sse2()); } }
Debug
Known issues
gotchaOnly works on x86/x86_64 architectures; will panic or return empty results on other targets.
fix
Use cfg!(target_arch = "x86_64") or cfg!(target_arch = "x86") to guard usage.
affects: >=11.0.0
Upgrade
Version history
11.6.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
4 hits · last 30 days
node
4
Resources
raw-cpuid — cargo add raw-cpuid · libregistry