$ target-triple

v1.0.1

TARGET and HOST triples

Downloads: 32.8M
Recent: 12.0M
Versions: 7
Updated: July 18, 2026

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

Linkshttps://crates.io/crates/target-triplehttps://docs.rs/target-triplehttps://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

8.4M32.8M

$ VERSION HISTORY

v1.0.1July 18, 2026
v1.0.0October 27, 2025
v0.1.4February 20, 2025

$ LINKS

$ INSTALL

cargo add target-triple

Or add to Cargo.toml: target-triple = "1.0.1"