#assembly #system #x86 #x86_64 #cpuid

bin+lib cupid

Native access to the x86 and x86_64 CPUID instruction

8 releases (5 breaking)

0.6.1 Oct 7, 2018
0.6.0 Jun 4, 2018
0.5.0 Nov 21, 2017
0.4.0 Nov 9, 2017
0.1.0 Jul 12, 2015

#10 in Hardware support

Download history 163/week @ 2018-10-14 285/week @ 2018-10-21 315/week @ 2018-10-28 641/week @ 2018-11-04 306/week @ 2018-11-11 466/week @ 2018-11-18 403/week @ 2018-11-25 165/week @ 2018-12-02 848/week @ 2018-12-09 359/week @ 2018-12-16 224/week @ 2018-12-23 278/week @ 2018-12-30 248/week @ 2019-01-06 75/week @ 2019-01-13 1102/week @ 2019-01-20

1,540 downloads per month
Used in 1 crate

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

~22KB