Skip to content

A feature detector for AArch64 features, i.e., FEAT_LSE?

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

tschuett/aarch64_features

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Rust MSRV

aarch64_features - A feature detector for AArch64 features, i.e., FEAT_LSE?

This crate checks for available features of AArch64 cores. It strives for completeness instead of focussing on the favorite features.

Update your Cargo.toml

[dependencies]
aarch64_features = "0.1.0"

and then

use aarch64_features::{check_features, Feature};

fn main() {
  let features = check_features();

  if features.contains(&Feature::FEAT_LSE) {
    println!("happy");
  }
}

supported configurations:

  • Linux AArch64
  • macOS AArch64
  • Windows on ARM.
  • anything not AArch64

Caveats

The Linux kernel only exposes a subset of the features to userspace, see feature registers. The set changes over time and thus the reported features of this crate can change between versions.

If you have a big little cpu, then you may want to pin the current thread.

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

About

A feature detector for AArch64 features, i.e., FEAT_LSE?

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published