$ target-triple
v1.0.1TARGET and HOST triples
Latest Update Summary
Crate
Name: target-triple New version: 1.0.0 Release date: 2025-10-27T16:38:55Z
Crate readme
Short description Access the $TARGET and $HOST rustc target triples that Cargo supplies to build scripts.
Long description The crate provides access to the Rust compiler's target triples, allowing users to retrieve the $TARGET and $HOST values needed for build scripts. It ensures that developers can work with specific platform information directly within their Rust projects.
Features • Cargo feature flags support • Access to rustc target triples for build scripts
Code Examples Basic usage
fn main() {
assert_eq!(target_triple::TARGET, "x86_64-unknown-linux-gnu");
assert_eq!(
concat!("target/", target_triple::target!()),
"target/x86_64-unknown-linux-gnu",
);
}
Links • https://crates.io/crates/target-triple • https://docs.rs/target-triple • https://github.com/dtolnay/target-triple
https://docs.rs/target-triple https://api.github.com/repos/dtolnay/target-triple/releases/257570322
Release info
Release version:
Release description
Code Examples
Patch update: 1.0.0 → 1.0.1
$ DOWNLOADS TREND
$ VERSION HISTORY
$ LINKS
$ INSTALL
cargo add target-tripleOr add to Cargo.toml: target-triple = "1.0.1"