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 does only depend on libcore.
```rust let cpuid = CpuId::new();
match cpuid.getvendorinfo() { Some(vf) => assert!(vf.as_string() == "GenuineIntel"), None => () }
let hassse = match cpuid.getfeatureinfo() { Some(finfo) => finfo.hassse(), None => false };
if has_sse { println!("CPU supports SSE!"); }
match cpuid.getcacheparameters() { Some(cparams) => { for cache in cparams { let size = cache.associativity() * cache.physicallinepartitions() * cache.coherencylinesize() * cache.sets(); println!("L{}-Cache size is {}", cache.level(), size); } }, None => println!("No cache parameter information available"), } ```