Skip to content

Add a glossary entry for target - #2388

Open
isHeSatoshi wants to merge 1 commit into
rust-lang:masterfrom
isHeSatoshi:glossary-define-target
Open

isHeSatoshi wants to merge 1 commit into
rust-lang:masterfrom
isHeSatoshi:glossary-define-target

Conversation

@isHeSatoshi

@isHeSatoshi isHeSatoshi commented Oct 19, 2026 •

Copy link
Copy Markdown

The glossary is where the reference defines its terms, and target was missing even though the glossary itself uses it ("the size can change depending on compiler version ... and target platform") and many pages are written in terms of it (usize size, the target_* conditional-compilation keys, #[repr(C)] layout).

The entry defines the term, gives the usual target-triple form as the identifier, and links to conditional compilation for the target_* keys. It also repeats the guideline from the authoring guide so the entry does not invite a list of targets into the reference: the reference documents that target properties exist, not which targets exist or what their properties are.

Note for reviewers: I kept this to the glossary rather than adding a new chapter, since the term is only ever used as a qualifier for other rules. If you would rather the definition live next to the conditional-compilation chapter, say so and I will move it.

Verification: cargo run --package=style-check -- src → passed!.

Fixes #2089.

The term *target* is used throughout the reference, including in the glossary
itself ("target platform"), but it was never defined.

Add an entry that says what a target is, points out the properties the language
defines in terms of it, and repeats the authoring guideline that the reference
does not document which targets exist or the properties of a particular target.
@rustbot rustbot added the S-waiting-on-review Status: The marked PR is awaiting review from a maintainer label Oct 19, 2026
Comment thread src/glossary.md

Several parts of the language are defined in terms of the target rather than in absolute terms, such as the size of `usize`, or the values of the `target_*` [conditional compilation] keys. The reference documents those properties as properties of the target, but it does not document which targets exist, nor the properties of any particular target.

[conditional compilation]: conditional-compilation.md

@DanielEScherzer DanielEScherzer Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please put this at the bottom of the file with the other link definitions

View changes since the review

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: The marked PR is awaiting review from a maintainer

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Define *target*

3 participants