]>
Commit | Line | Data |
---|---|---|
6a06907d XL |
1 | # Getting Started |
2 | ||
353b0b11 FG |
3 | Thank you for your interest in contributing to Rust! There are many ways to |
4 | contribute, and we appreciate all of them. | |
5 | ||
6a06907d XL |
6 | <!-- toc --> |
7 | ||
353b0b11 FG |
8 | If this is your first time contributing, the [walkthrough] chapter can give you a good example of |
9 | how a typical contribution would go. | |
10 | ||
6a06907d XL |
11 | This documentation is _not_ intended to be comprehensive; it is meant to be a |
12 | quick guide for the most useful things. For more information, [see this | |
13 | chapter on how to build and run the compiler](./building/how-to-build-and-run.md). | |
14 | ||
353b0b11 FG |
15 | [internals]: https://internals.rust-lang.org |
16 | [rust-discord]: http://discord.gg/rust-lang | |
17 | [rust-zulip]: https://rust-lang.zulipchat.com | |
18 | [coc]: https://www.rust-lang.org/conduct.html | |
19 | [walkthrough]: ./walkthrough.md | |
20 | [Getting Started]: ./getting-started.md | |
21 | ||
6a06907d XL |
22 | ## Asking Questions |
23 | ||
353b0b11 FG |
24 | If you have questions, please make a post on the [Rust Zulip server][rust-zulip] or |
25 | [internals.rust-lang.org][internals]. If you are contributing to Rustup, be aware they are not on | |
26 | Zulip - you can ask questions in `#wg-rustup` [on Discord][rust-discord]. | |
27 | See the [list of teams and working groups][governance] and [the Community page][community] on the | |
28 | official website for more resources. | |
29 | ||
30 | [governance]: https://www.rust-lang.org/governance | |
31 | [community]: https://www.rust-lang.org/community | |
32 | ||
33 | As a reminder, all contributors are expected to follow our [Code of Conduct][coc]. | |
34 | ||
6a06907d XL |
35 | The compiler team (or `t-compiler`) usually hangs out in Zulip [in this |
36 | "stream"][z]; it will be easiest to get questions answered there. | |
37 | ||
38 | [z]: https://rust-lang.zulipchat.com/#narrow/stream/131828-t-compiler | |
39 | ||
40 | **Please ask questions!** A lot of people report feeling that they are "wasting | |
41 | expert time", but nobody on `t-compiler` feels this way. Contributors are | |
42 | important to us. | |
43 | ||
44 | Also, if you feel comfortable, prefer public topics, as this means others can | |
45 | see the questions and answers, and perhaps even integrate them back into this | |
46 | guide :) | |
47 | ||
48 | ### Experts | |
49 | ||
50 | Not all `t-compiler` members are experts on all parts of `rustc`; it's a pretty | |
51 | large project. To find out who has expertise on different parts of the | |
52 | compiler, [consult this "experts map"][map]. | |
53 | ||
54 | It's not perfectly complete, though, so please also feel free to ask questions | |
55 | even if you can't figure out who to ping. | |
56 | ||
353b0b11 FG |
57 | Another way to find experts for a given part of the compiler is to see who has made recent commits. |
58 | For example, to find people who have recently worked on name resolution since the 1.68.2 release, | |
59 | you could run `git shortlog -n 1.68.2.. compiler/rustc_resolve/`. Ignore any commits starting with | |
60 | "Rollup merge" or commits by `@bors` (see [CI contribution prodcedures](./contributing.md#ci) for | |
61 | more information about these commits). | |
62 | ||
6a06907d XL |
63 | [map]: https://github.com/rust-lang/compiler-team/blob/master/content/experts/map.toml |
64 | ||
65 | ### Etiquette | |
66 | ||
67 | We do ask that you be mindful to include as much useful information as you can | |
68 | in your question, but we recognize this can be hard if you are unfamiliar with | |
69 | contributing to Rust. | |
70 | ||
71 | Just pinging someone without providing any context can be a bit annoying and | |
72 | just create noise, so we ask that you be mindful of the fact that the | |
73 | `t-compiler` folks get a lot of pings in a day. | |
74 | ||
353b0b11 | 75 | ## What should I work on? |
6a06907d | 76 | |
353b0b11 FG |
77 | The Rust project is quite large and it can be difficult to know which parts of the project need |
78 | help, or are a good starting place for beginners. Here are some suggested starting places. | |
6a06907d | 79 | |
353b0b11 | 80 | ### Easy or mentored issues |
6a06907d | 81 | |
353b0b11 FG |
82 | If you're looking for somewhere to start, check out the following [issue |
83 | search][help-wanted-search]. See the [Triage] for an explanation of these labels. You can also try | |
84 | filtering the search to areas you're interested in. For example: | |
6a06907d | 85 | |
353b0b11 FG |
86 | - `repo:rust-lang/rust-clippy` will only show clippy issues |
87 | - `label:T-compiler` will only show issues related to the compiler | |
88 | - `label:A-diagnostics` will only show diagnostic issues | |
6a06907d | 89 | |
353b0b11 FG |
90 | Not all important or beginner work has issue labels. |
91 | See below for how to find work that isn't labelled. | |
6a06907d | 92 | |
353b0b11 FG |
93 | [help-wanted-search]: https://github.com/issues?q=is%3Aopen+is%3Aissue+org%3Arust-lang+no%3Aassignee+label%3AE-easy%2C%22good+first+issue%22%2Cgood-first-issue%2CE-medium%2CE-help-wanted%2CE-mentor |
94 | [Triage]: ./contributing.md#issue-triage | |
6a06907d | 95 | |
353b0b11 | 96 | ### Recurring work |
6a06907d | 97 | |
353b0b11 FG |
98 | Some work is too large to be done by a single person. In this case, it's common to have "Tracking |
99 | issues" to co-ordinate the work between contributors. Here are some example tracking issues where | |
100 | it's easy to pick up work without a large time commitment: | |
6a06907d | 101 | |
353b0b11 FG |
102 | - [Rustdoc Askama Migration](https://github.com/rust-lang/rust/issues/108868) |
103 | - [Diagnostic Translation](https://github.com/rust-lang/rust/issues/100717) | |
104 | - [Move UI tests to subdirectories](https://github.com/rust-lang/rust/issues/73494) | |
6a06907d | 105 | |
353b0b11 | 106 | If you find more recurring work, please feel free to add it here! |
6a06907d | 107 | |
353b0b11 | 108 | ### Clippy issues |
6a06907d | 109 | |
353b0b11 FG |
110 | The [Clippy] project has spent a long time making its contribution process as friendly to newcomers |
111 | as possible. Consider working on it first to get familiar with the process and the compiler | |
112 | internals. | |
6a06907d | 113 | |
353b0b11 | 114 | See [the Clippy contribution guide][clippy-contributing] for instructions on getting started. |
6a06907d | 115 | |
353b0b11 FG |
116 | [Clippy]: https://doc.rust-lang.org/clippy/ |
117 | [clippy-contributing]: https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md | |
6a06907d | 118 | |
353b0b11 | 119 | ### Diagnostic issues |
6a06907d | 120 | |
353b0b11 FG |
121 | Many diagnostic issues are self-contained and don't need detailed background knowledge of the |
122 | compiler. You can see a list of diagnostic issues [here][diagnostic-issues]. | |
6a06907d | 123 | |
353b0b11 | 124 | [diagnostic-issues]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+label%3AA-diagnostics+no%3Aassignee |
6a06907d XL |
125 | |
126 | ### Contributing code to other Rust projects | |
127 | ||
128 | There are a bunch of other projects that you can contribute to outside of the | |
353b0b11 | 129 | `rust-lang/rust` repo, including `cargo`, `miri`, `rustup`, and many others. |
6a06907d XL |
130 | |
131 | These repos might have their own contributing guidelines and procedures. Many | |
132 | of them are owned by working groups (e.g. `chalk` is largely owned by | |
133 | WG-traits). For more info, see the documentation in those repos' READMEs. | |
134 | ||
135 | ### Other ways to contribute | |
136 | ||
137 | There are a bunch of other ways you can contribute, especially if you don't | |
138 | feel comfortable jumping straight into the large `rust-lang/rust` codebase. | |
139 | ||
140 | The following tasks are doable without much background knowledge but are | |
141 | incredibly helpful: | |
142 | ||
143 | - [Cleanup crew][iceb]: find minimal reproductions of ICEs, bisect | |
144 | regressions, etc. This is a way of helping that saves a ton of time for | |
145 | others to fix an error later. | |
146 | - [Writing documentation][wd]: if you are feeling a bit more intrepid, you could try | |
147 | to read a part of the code and write doc comments for it. This will help you | |
148 | to learn some part of the compiler while also producing a useful artifact! | |
353b0b11 | 149 | - [Triaging issues][triage]: categorizing, replicating, and minimizing issues is very helpful to the Rust maintainers. |
6a06907d XL |
150 | - [Working groups][wg]: there are a bunch of working groups on a wide variety |
151 | of rust-related things. | |
353b0b11 FG |
152 | - Answer questions in the _Get Help!_ channels on the [Rust Discord |
153 | server][rust-discord], on [users.rust-lang.org][users], or on | |
154 | [StackOverflow][so]. | |
155 | - Participate in the [RFC process](https://github.com/rust-lang/rfcs). | |
156 | - Find a [requested community library][community-library], build it, and publish | |
157 | it to [Crates.io](http://crates.io). Easier said than done, but very, very | |
158 | valuable! | |
159 | ||
160 | [rust-discord]: https://discord.gg/rust-lang | |
161 | [users]: https://users.rust-lang.org/ | |
162 | [so]: http://stackoverflow.com/questions/tagged/rust | |
163 | [community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library | |
6a06907d XL |
164 | |
165 | [iceb]: ./notification-groups/cleanup-crew.md | |
166 | [wd]: ./contributing.md#writing-documentation | |
167 | [wg]: https://rust-lang.github.io/compiler-team/working-groups/ | |
353b0b11 | 168 | [triage]: ./contributing.md#issue-triage |
6a06907d | 169 | |
353b0b11 | 170 | ## Cloning and Building |
6a06907d | 171 | |
353b0b11 | 172 | See ["How to build and run the compiler"](./building//how-to-build-and-run.md). |
6a06907d | 173 | |
353b0b11 | 174 | ## Contributor Procedures |
5e7ed085 | 175 | |
353b0b11 | 176 | This section has moved to the ["Contribution Procedures"](./contributing.md) chapter. |
6a06907d XL |
177 | |
178 | ## Other Resources | |
179 | ||
353b0b11 FG |
180 | This section has moved to the ["About this guide"][more-links] chapter. |
181 | ||
182 | [more-links]: ./about-this-guide.md#other-places-to-find-information |