Skip to content

Commit 87b2110

Browse files
committed
Add howto for adding new targets
1 parent ce1a7e4 commit 87b2110

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed

src/doc/rustc/src/target-tier-policy.md

+25
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## Table of Contents
44

55
* [General](#general)
6+
* [Adding a new target](#adding-a-new-target)
67
* [Tier 3 target policy](#tier-3-target-policy)
78
* [Tier 2 target policy](#tier-2-target-policy)
89
* [Tier 2 with host tools](#tier-2-with-host-tools)
@@ -104,6 +105,30 @@ indicates something entirely optional, and does not indicate guidance or
104105
recommendations. This language is based on [IETF RFC
105106
2119](https://tools.ietf.org/html/rfc2119).
106107

108+
## Adding a new target
109+
110+
New targets typically start as Tier 3 and then can be promoted later.
111+
To propose addition of a new target, open a pull request on [`rust-lang/rust`]:
112+
113+
- Copy the [Tier 3 target policy](#tier-3-target-policy) to the description
114+
and fill it out, see [example][tier3example].
115+
- Add a new description for the target in `src/doc/rustc/src/platform-support`
116+
using the [template][platform_template].
117+
- Add the target to the [SUMMARY.md][summary] (allows wildcards) and
118+
[platform-support.md][platformsupport] (must name all targets verbatim).
119+
Link to the created description page.
120+
- Ensure the pull request is assigned to a member of the [Rust compiler team][rust_compiler_team] by commenting:
121+
```text
122+
r? compiler-team
123+
```
124+
125+
[tier3example]: https://github.com/rust-lang/rust/pull/94872
126+
[platform_template]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support/TEMPLATE.md
127+
[summary]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/SUMMARY.md
128+
[platformsupport]: https://github.com/rust-lang/rust/blob/master/src/doc/rustc/src/platform-support.md
129+
[rust_compiler_team]: https://www.rust-lang.org/governance/teams/compiler
130+
[`rust-lang/rust`]: https://github.com/rust-lang/rust
131+
107132
## Tier 3 target policy
108133

109134
At this tier, the Rust project provides no official support for a target, so we

0 commit comments

Comments
 (0)