rustc-targets 0.1.0

Get the list of targets supported by rustc.
Documentation
  • Coverage
  • 20%
    1 out of 5 items documented1 out of 4 items with examples
  • Size
  • Source code size: 16.11 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 2.09 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 10s Average build duration of successful builds.
  • all releases: 10s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • JohnScience/rustc-targets
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JohnScience

rustc-targets

crates.io crates.io

Library for getting the list of targets supported by rustc.

Usage

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}");
    }
}

Running example

cargo run --example targets

License