41 releases

0.13.5 Feb 15, 2026
0.13.4 Dec 18, 2025
0.13.3 Sep 9, 2025
0.13.2 Feb 7, 2025
0.0.3 Jul 13, 2018

#3 in No standard library

Download history 1403898/week @ 2025-12-27 2667537/week @ 2026-01-03 3033702/week @ 2026-01-10 3029329/week @ 2026-01-17 3246859/week @ 2026-01-24 3098063/week @ 2026-01-31 3239034/week @ 2026-02-07 3308883/week @ 2026-02-14 3600974/week @ 2026-02-21 4255332/week @ 2026-02-28 4372189/week @ 2026-03-07 4092554/week @ 2026-03-14 4135274/week @ 2026-03-21 4117831/week @ 2026-03-28 4444627/week @ 2026-04-04 4517507/week @ 2026-04-11

17,851,450 downloads per month
Used in 6,343 crates (211 directly)

Apache-2.0 WITH LLVM-exception

110KB
2.5K SLoC

This is a library for managing targets for compilers and related tools.

Currently, the main feature is support for decoding LLVM "triples", which are strings that identify a particular target configuration. They're named "triples" because historically they contained three fields, though over time they've added additional fields. This library provides a Triple struct containing enums for each of fields of a triple. Triple implements FromStr and fmt::Display so it can be converted to and from the conventional string representation of a triple.

Triple also has functions for querying a triple's endianness, pointer bit width, and binary format.

And, Triple and the enum types have host() constructors, for targeting the host.

It somewhat supports reading triples currently used by rustc and rustup, though beware that the mapping between rustc and LLVM triples is not one-to-one.

It does not support reading JSON target files itself. To use it with a JSON target file, construct a Triple using the value of the "llvm-target" field.

Dependencies

~145KB