35 releases

0.12.16 Jul 30, 2024
0.12.14 Feb 22, 2024
0.12.12 Oct 19, 2023
0.12.11 Jul 31, 2023
0.0.3 Jul 13, 2018

#2 in No standard library

Download history 996955/week @ 2024-07-27 1073282/week @ 2024-08-03 1239284/week @ 2024-08-10 1214648/week @ 2024-08-17 1484233/week @ 2024-08-24 1147215/week @ 2024-08-31 1432083/week @ 2024-09-07 1100183/week @ 2024-09-14 1276404/week @ 2024-09-21 1412110/week @ 2024-09-28 1420311/week @ 2024-10-05 1663307/week @ 2024-10-12 1202445/week @ 2024-10-19 1145154/week @ 2024-10-26 1175920/week @ 2024-11-02 1035737/week @ 2024-11-09

4,773,627 downloads per month
Used in 3,331 crates (148 directly)

Apache-2.0 WITH LLVM-exception

100KB
2.5K SLoC

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

Currently, the main feature is support for decoding "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 supports all triples currently used by rustc and rustup.

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.


lib.rs:

Target triple support.

Dependencies

~165KB