cupid
cupid copied to clipboard
Get information about the x86 and x86_64 processor
Cupid
Native Rust access to the x86 and x86_64 CPUID instruction.
Overview
extern crate cupid;
fn main() {
let information = cupid::master();
println!("{:#?}", information);
if let Some(information) = information {
if information.sse4_2() {
println!("SSE 4.2 Available");
}
}
}
See also
- libcpuid - A C library providing access to the CPUID instruction.
- cpuid - Rust bindings to the libcpuid library.
- rust-x86 - Another native crate that includes CPUID and more.
Contributing
- Fork it ( https://github.com/shepmaster/cupid/fork )
- Create your feature branch (
git checkout -b my-new-feature) - Add a failing test.
- Add code to pass the test.
- Commit your changes (
git commit -am 'Add some feature') - Ensure tests pass.
- Push to the branch (
git push origin my-new-feature) - Create a new Pull Request