pub fn from_cli() -> Result<Targets, Error>Expand description
Returns the list of targets supported by the current rustc using CLI.
The list of targets can be iterated over using the iter method:
ยงExample
fn main() {
let targets = rustc_targets::from_cli().unwrap();
for (i,target) in targets.iter().unwrap().enumerate() {
println!("{i}. {target}");
}
}