Skip to content

Commit 23d4ff6

Browse files
authored
Merge pull request #61 from Mark-Simulacrum/target-review
Add policy detailing review procedure for target-specific code
2 parents 3276406 + d77c259 commit 23d4ff6

File tree

2 files changed

+26
-0
lines changed

2 files changed

+26
-0
lines changed

src/SUMMARY.md

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
- [When to `#[inline]`](./policy/inline.md)
2121
- [Doc alias policy](./policy/doc-alias.md)
2222
- [Safety comments policy](./policy/safety-comments.md)
23+
- [Reviewing target-specific code](./policy/target-code.md)
2324

2425
- [Tricky situations]()
2526
- [Drop and `#[may_dangle]`](./tricky/may-dangle.md)

src/policy/target-code.md

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Reviewing target-specific code
2+
3+
When reviewing target-specific code, depending on the [tier] of the target in
4+
question, different level of scrutiny is expected from reviewers.
5+
6+
For tier 1 targets, the reviewer should perform a full review of the code.
7+
Essentially treat the code as *not* platform specific.
8+
9+
For tier 2 and tier 3 targets, the reviewer should confirm that the code:
10+
11+
* Only affects 1 or more of such targets (i.e., is truly target-specific)
12+
* Does not introduce new licensing hazards (e.g., license headers or similar)
13+
* Is either proposed by a target maintainer[^1] or has pinged and received +1s
14+
from at least one target maintainer. Where no maintainer is present, look for
15+
whether the author is reputable and/or affiliated with the target in some way
16+
(e.g., authored original code, works for a company maintaining the target, etc.).
17+
18+
Note that this review does *not* include checking for correctness or for code
19+
quality. We lack the review bandwidth or expertise to perform detailed reviews
20+
of tier 2 and tier 3 targets.
21+
22+
[^1]: Target maintainers are listed for most targets in the [platform support] documentation.
23+
24+
[tier]: https://doc.rust-lang.org/nightly/rustc/platform-support.html
25+
[platform support]: https://doc.rust-lang.org/nightly/rustc/platform-support.html

0 commit comments

Comments
 (0)