Crates.io | target-triple |
lib.rs | target-triple |
version | 0.1.3 |
source | src |
created_at | 2023-12-21 03:14:48.691246 |
updated_at | 2024-05-14 21:39:04.062817 |
description | TARGET and HOST triples |
homepage | |
repository | https://github.com/dtolnay/target-triple |
max_upload_size | |
id | 1076256 |
size | 18,019 |
Access the $TARGET and $HOST rustc target triples that Cargo supplies to build scripts.
fn main() {
// As a const &str:
assert_eq!(target_triple::TARGET, "x86_64-unknown-linux-gnu");
// As a string literal:
assert_eq!(
concat!("target/", target_triple::target!()),
"target/x86_64-unknown-linux-gnu",
);
}