| Crates.io | target-triple |
| lib.rs | target-triple |
| version | 0.1.4 |
| created_at | 2023-12-21 03:14:48.691246+00 |
| updated_at | 2025-02-20 05:54:45.743033+00 |
| description | TARGET and HOST triples |
| homepage | |
| repository | https://github.com/dtolnay/target-triple |
| max_upload_size | |
| id | 1076256 |
| size | 18,727 |
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",
);
}