| Crates.io | rustc-host |
| lib.rs | rustc-host |
| version | 0.1.7 |
| created_at | 2023-02-03 01:35:43.344675+00 |
| updated_at | 2023-02-05 08:48:19.653953+00 |
| description | Get host target triplet of rustc. |
| homepage | |
| repository | https://github.com/JohnScience/rustc-host |
| max_upload_size | |
| id | 775319 |
| size | 20,681 |
Combined crate (library + binary) for getting the so-called "host triple" of rustc.
Add this to your Cargo.toml:
[dependencies]
rustc-host = "0.1"
after that you can use it like this:
extern crate rustc_host;
fn main() {
let host_triple = rustc_host::from_cli()
.expect("failed to get host triple from rustc");
println!("host triple: {}", host_triple);
}
cargo install rustc-host
rustc-host
x86_64-pc-windows-msvc
unsafe - disabled by default, enables unsafe code that reuses the String
buffer obtained from rustc -Vv instead of allocating a new one.