target-lexicon

Crates.iotarget-lexicon
lib.rstarget-lexicon
version0.12.16
sourcesrc
created_at2018-05-24 19:59:42.278674
updated_at2024-07-30 22:40:30.64731
descriptionTargeting utilities for compilers and related tools
homepage
repositoryhttps://github.com/bytecodealliance/target-lexicon
max_upload_size
id66926
size117,497
Nick Fitzgerald (fitzgen)

documentation

https://docs.rs/target-lexicon/

README

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.

Commit count: 176

cargo fmt