Crate rust_target_feature_data

Crate rust_target_feature_data 

Source
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.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.85.0", "i686-linux-android")?.collect();
let fxsr = features.iter().find(|f| f.name == "fxsr").unwrap();
assert_eq!(fxsr.globally_enabled, false);

let features: Vec<_> = find("1.86.0", "i686-linux-android")?.collect();
let fxsr = features.iter().find(|f| f.name == "fxsr").unwrap();
assert_eq!(fxsr.globally_enabled, true);

Structs§

TargetFeature
Information about a target feature.

Enums§

NotFoundError
An error finding target feature data.

Functions§

find
Find the target features applicable to a Rust version and target.