Skip to main content

Crate rucc_target

Crate rucc_target 

Source
Expand description

Target descriptions: triples, and the facts about a target that the rest of the compiler reads rather than hard-codes.

Design: spec/12-abi-and-runtime.md. Layer rank 1, see spec/18-package-layout.md.

The rule from spec/18-package-layout.md section 18.2 is that there is no target-specific code outside this crate and the per-target rule sets. Everything a pass needs to know about a target is a field it can read here. That rule is what makes the claim in spec/10-backend.md testable, namely that a new target is a rule set and a few data files, and M10 brings up a fourth target specifically to put a number on it.

§Status

Triple parsing and the basic data model are real, which is what rucc --print-config reports. Register files, machine models and the full ABI descriptions land in M3 and M6.

This crate is tier 3 in spec/18-package-layout.md section 18.5: its Rust API is explicitly unstable and will change without a major version bump.

Structs§

ParseTripleError
Why a triple failed to parse.
TargetInfo
The facts about a target that the compiler reads instead of hard-coding.
Triple
A target triple.

Enums§

Arch
A target architecture.
Env
The C runtime and ABI variant.
ObjectFormat
The object file format to emit.
Os
The operating system a target runs on.