#x86-64 #cpuid #assembly #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

#698 in Hardware support

Download history 872/week @ 2024-01-03 525/week @ 2024-01-10 521/week @ 2024-01-17 481/week @ 2024-01-24 443/week @ 2024-01-31 770/week @ 2024-02-07 1140/week @ 2024-02-14 703/week @ 2024-02-21 679/week @ 2024-02-28 681/week @ 2024-03-06 895/week @ 2024-03-13 909/week @ 2024-03-20 535/week @ 2024-03-27 762/week @ 2024-04-03 780/week @ 2024-04-10 760/week @ 2024-04-17

2,947 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

~31KB