#x86-64 #assembly #cpuid #system

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

#603 in Hardware support

Download history 1830/week @ 2024-07-23 1602/week @ 2024-07-30 976/week @ 2024-08-06 1348/week @ 2024-08-13 1091/week @ 2024-08-20 1419/week @ 2024-08-27 1664/week @ 2024-09-03 1417/week @ 2024-09-10 1698/week @ 2024-09-17 1848/week @ 2024-09-24 1161/week @ 2024-10-01 2213/week @ 2024-10-08 1864/week @ 2024-10-15 1941/week @ 2024-10-22 1924/week @ 2024-10-29 1787/week @ 2024-11-05

8,254 downloads per month
Used in 5 crates (3 directly)

MIT license

41KB
1K SLoC

Cupid

Native Rust access to the x86 and x86_64 CPUID instruction.

Linux Build Status Windows Build Status

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

~32KB