raw-cpuid 8.0.0

A library to parse the x86 CPUID instruction, written in rust with no external dependencies. The implementation closely resembles the Intel CPUID manual description. The library does only depend on libcore.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
extern crate cc;
extern crate rustc_version;
use rustc_version::{version, version_meta, Channel, Version};

fn main() {
    let newer_than_1_27 = version().unwrap() >= Version::parse("1.27.0").unwrap();
    if newer_than_1_27 {
        println!("cargo:rustc-cfg=feature=\"use_arch\"");
    } else {
        cc::Build::new().file("src/cpuid.c").compile("libcpuid.a");
    }

    if version_meta().unwrap().channel == Channel::Nightly {
        println!("cargo:rustc-cfg=feature=\"nightly\"");
    }
}