Expand description
Data about Rust target features.
Different versions of Rust support different target features. Different Rust targets automatically enable different target features. Different versions of Rust automatically enable different target features for the same target. Enabling the same target feature implies
This crate provides target feature data for all targets covering Rust versions:
"1.83.0"
"1.84.0"
(1.84.1 is identical)"1.85.0"
(1.85.1 is identical)"1.86.0"
"1.87.0"
(from 1.87.0-beta.5)
Rust 1.88.0 provides target feature data for the selected target via rustdoc
’s JSON output
format, making
this crate obsolete going forward.
§Example
use rust_target_feature_data::find;
let features: Vec<_> = find("1.83.0", "x86_64-unknown-linux-gnu")?.collect();
let pclmulqdq = features.iter().find(|f| f.name == "pclmulqdq").unwrap();
assert_eq!(pclmulqdq.globally_enabled, false);
assert_eq!(pclmulqdq.implies_features, [].into());
let features: Vec<_> = find("1.84.0", "x86_64-unknown-linux-gnu")?.collect();
let pclmulqdq = features.iter().find(|f| f.name == "pclmulqdq").unwrap();
assert_eq!(pclmulqdq.implies_features, ["sse2"].into());
Structs§
- Target
Feature - Information about a target feature.
Enums§
- NotFound
Error - An error finding target feature data.
Functions§
- find
- Find the target features applicable to a Rust version and target.