Crates.io | rustc-targets |
lib.rs | rustc-targets |
version | 0.1.0 |
source | src |
created_at | 2023-02-03 02:45:17.227313 |
updated_at | 2023-02-03 02:45:17.227313 |
description | Get the list of targets supported by rustc. |
homepage | |
repository | https://github.com/JohnScience/rustc-targets |
max_upload_size | |
id | 775352 |
size | 16,444 |
Library for getting the list of targets supported by rustc.
Add this to your Cargo.toml:
[dependencies]
rustc-targets = "0.1"
after that you can use it like this:
fn main() {
let targets = rustc_targets::from_cli().unwrap();
for (i,target) in targets.iter().unwrap().enumerate() {
println!("{i}. {target}");
}
}
cargo run --example targets