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.
The code should be in sync with the latest June 2015 revision of the Intel Architectures Software Developer’s Manual.
```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"), } ```