target-lexicon

Crates.iotarget-lexicon
lib.rstarget-lexicon
version
sourcesrc
created_at2018-05-24 19:59:42.278674
updated_at2024-12-20 13:26:18.469042
descriptionLLVM target triple types
homepage
repositoryhttps://github.com/bytecodealliance/target-lexicon
max_upload_size
id66926
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
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 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.

Commit count: 187

cargo fmt