#assembly #system #x86 #x86_64 #cpuid

bin+lib cupid

Native access to the x86 and x86_64 CPUID instruction

7 releases (breaking)

0.6.0 Jun 4, 2018
0.5.0 Nov 21, 2017
0.4.0 Nov 9, 2017
0.3.0 Mar 15, 2017
0.1.0 Jul 12, 2015

#3 in Hardware support

Download history 627/week @ 2018-07-28 429/week @ 2018-08-04 629/week @ 2018-08-11 321/week @ 2018-08-18 50/week @ 2018-08-25 184/week @ 2018-09-01 355/week @ 2018-09-08 462/week @ 2018-09-15 77/week @ 2018-09-22 98/week @ 2018-09-29 300/week @ 2018-10-06 243/week @ 2018-10-13 162/week @ 2018-10-20

1,740 downloads per month

MIT license

40KB
1K SLoC

Cupid

Native Rust access to the x86 and x86_64 CPUID instruction.

Linux Build Status Windows Build Status Current Version

Documentation

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

  1. Fork it ( https://github.com/shepmaster/cupid/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Add a failing test.
  4. Add code to pass the test.
  5. Commit your changes (git commit -am 'Add some feature')
  6. Ensure tests pass.
  7. Push to the branch (git push origin my-new-feature)
  8. Create a new Pull Request

No runtime deps

~24KB