#assembly #system #x86 #x86-64 #cpuid

bin+lib cupid

Native access to the x86 and x86_64 CPUID instruction

8 releases (5 breaking)

Uses old Rust 2015

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

#413 in Hardware support

Download history 1278/week @ 2023-02-03 1124/week @ 2023-02-10 1109/week @ 2023-02-17 1166/week @ 2023-02-24 1081/week @ 2023-03-03 841/week @ 2023-03-10 717/week @ 2023-03-17 732/week @ 2023-03-24 845/week @ 2023-03-31 636/week @ 2023-04-07 726/week @ 2023-04-14 855/week @ 2023-04-21 668/week @ 2023-04-28 723/week @ 2023-05-05 796/week @ 2023-05-12 552/week @ 2023-05-19

2,859 downloads per month
Used in 4 crates (2 directly)

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

~31KB