]> git.proxmox.com Git - rustc.git/blob - src/doc/rustc-dev-guide/src/contributing.md
New upstream version 1.63.0+dfsg1
[rustc.git] / src / doc / rustc-dev-guide / src / contributing.md
1 # Contributing to Rust
2
3 Thank you for your interest in contributing to Rust! There are many ways to
4 contribute, and we appreciate all of them.
5
6 <!-- toc -->
7
8 If you have questions, please make a post on [internals.rust-lang.org][internals] or
9 hop on the [Rust Discord server][rust-discord] or [Rust Zulip server][rust-zulip].
10
11 As a reminder, all contributors are expected to follow our [Code of Conduct][coc].
12
13 If this is your first time contributing, the [Getting Started] and
14 [walkthrough] chapters can give you a good example of how a typical
15 contribution would go.
16
17 [internals]: https://internals.rust-lang.org
18 [rust-discord]: http://discord.gg/rust-lang
19 [rust-zulip]: https://rust-lang.zulipchat.com
20 [coc]: https://www.rust-lang.org/conduct.html
21 [walkthrough]: ./walkthrough.md
22 [Getting Started]: ./getting-started.md
23
24 ## Feature Requests
25
26 Feature requests need to go through a process to be approved by the relevant
27 teams. Usually this requires a Final Comment Period (FCP) or even a Request for
28 Comments (RFC). See [Getting Started] for more information about these processes.
29
30 ## Bug Reports
31
32 While bugs are unfortunate, they're a reality in software. We can't fix what we
33 don't know about, so please report liberally. If you're not sure if something
34 is a bug or not, feel free to file a bug anyway.
35
36 **If you believe reporting your bug publicly represents a security risk to Rust users,
37 please follow our [instructions for reporting security vulnerabilities][vuln]**.
38
39 [vuln]: https://www.rust-lang.org/policies/security
40
41 If you're using the nightly channel, please check if the bug exists in the
42 latest toolchain before filing your bug. It might be fixed already.
43
44 If you have the chance, before reporting a bug, please [search existing
45 issues](https://github.com/rust-lang/rust/issues?q=is%3Aissue),
46 as it's possible that someone else has already reported your error. This doesn't
47 always work, and sometimes it's hard to know what to search for, so consider this
48 extra credit. We won't mind if you accidentally file a duplicate report.
49
50 Similarly, to help others who encountered the bug find your issue, consider
51 filing an issue with a descriptive title, which contains information that might
52 be unique to it. This can be the language or compiler feature used, the
53 conditions that trigger the bug, or part of the error message if there is any.
54 An example could be: **"impossible case reached" on lifetime inference for impl
55 Trait in return position**.
56
57 Opening an issue is as easy as following [this
58 link](https://github.com/rust-lang/rust/issues/new/choose) and filling out the fields
59 in the appropriate provided template.
60
61 ## Pull Requests
62
63 Pull requests (or PRs for short) are the primary mechanism we use to change Rust.
64 GitHub itself has some [great documentation][about-pull-requests] on using the
65 Pull Request feature. We use the "fork and pull" model [described here][development-models],
66 where contributors push changes to their personal fork and create pull requests to
67 bring those changes into the source repository. We have more info about how to use git
68 when contributing to Rust under [the git section](./git.md).
69
70 [about-pull-requests]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
71 [development-models]: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/getting-started/about-collaborative-development-models#fork-and-pull-model
72
73 ### r?
74
75 All pull requests are reviewed by another person. We have a bot,
76 [@rust-highfive][rust-highfive], that will automatically assign a random person
77 to review your request based on which files you changed.
78
79 If you want to request that a specific person reviews your pull request, you
80 can add an `r?` to the pull request description or in a comment. For example,
81 [Steve][steveklabnik] usually reviews documentation changes. So if you were to
82 make a documentation change, add
83
84 r? @steveklabnik
85
86 to the end of the pull request description, and [@rust-highfive][rust-highfive] will assign
87 [@steveklabnik][steveklabnik] instead of a random person. This is entirely optional.
88
89 You can also assign a random reviewer from a specific team by writing `r? rust-lang/groupname`.
90 So if you were making a diagnostics change, then you could get a reviewer from the diagnostics
91 team by adding:
92
93 r? rust-lang/diagnostics
94
95 For a full list of possible `groupname` check the `groups` section at the
96 [rust highfive config file](https://github.com/rust-lang/highfive/blob/master/highfive/configs/rust-lang/rust.json).
97
98 ### CI
99
100 In addition to being reviewed by a human, pull requests are automatically tested
101 thanks to continuous integration (CI). Basically, every time you open and update
102 a pull request, CI builds the compiler and tests it against the
103 [compiler test suite][rctd], and also performs other tests such as checking that
104 your pull request is in compliance with Rust's style guidelines.
105
106 Running continuous integration tests allows PR authors to catch mistakes early
107 without going through a first review cycle, and also helps reviewers stay aware
108 of the status of a particular pull request.
109
110 Rust has plenty of CI capacity, and you should never have to worry about wasting
111 computational resources each time you push a change. It is also perfectly fine
112 (and even encouraged!) to use the CI to test your changes if it can help your
113 productivity. In particular, we don't recommend running the full `./x.py test` suite locally,
114 since it takes a very long time to execute.
115
116 ### r+
117
118 After someone has reviewed your pull request, they will leave an annotation
119 on the pull request with an `r+`. It will look something like this:
120
121 @bors r+
122
123 This tells [@bors], our lovable integration bot, that your pull request has
124 been approved. The PR then enters the [merge queue][merge-queue], where [@bors]
125 will run *all* the tests on *every* platform we support. If it all works out,
126 [@bors] will merge your code into `master` and close the pull request.
127
128 Depending on the scale of the change, you may see a slightly different form of `r+`:
129
130 @bors r+ rollup
131
132 The additional `rollup` tells [@bors] that this change should always be "rolled up".
133 Changes that are rolled up are tested and merged alongside other PRs, to
134 speed the process up. Typically only small changes that are expected not to conflict
135 with one another are marked as "always roll up".
136
137 [rust-highfive]: https://github.com/rust-highfive
138 [steveklabnik]: https://github.com/steveklabnik
139 [@bors]: https://github.com/bors
140 [merge-queue]: https://bors.rust-lang.org/queue/rust
141
142 ### Opening a PR
143
144 You are now ready to file a pull request? Great! Here are a few points you
145 should be aware of.
146
147 All pull requests should be filed against the `master` branch, except in very
148 particular scenarios. Unless you know for sure that you should target another
149 branch, `master` will be the right choice (it's also the default).
150
151 Make sure your pull request is in compliance with Rust's style guidelines by running
152
153 $ ./x.py test tidy --bless
154
155 We recommend to make this check before every pull request (and every new commit
156 in a pull request); you can add [git hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks)
157 before every push to make sure you never forget to make this check. The
158 CI will also run tidy and will fail if tidy fails.
159
160 Rust follows a _no merge-commit policy_, meaning, when you encounter merge
161 conflicts you are expected to always rebase instead of merging. E.g. always use
162 rebase when bringing the latest changes from the master branch to your feature
163 branch.
164
165 If you encounter merge conflicts or when a reviewer asks you to perform some
166 changes, your PR will get marked as `S-waiting-on-author`. When you resolve
167 them, you should use `@rustbot` to mark it as `S-waiting-on-review`:
168
169 @rustbot label -S-waiting-on-author +S-waiting-on-review
170
171 See [this chapter][labeling] for more details.
172
173 GitHub allows [closing issues using keywords][closing-keywords]. This feature
174 should be used to keep the issue tracker tidy. However, it is generally preferred
175 to put the "closes #123" text in the PR description rather than the issue commit;
176 particularly during rebasing, citing the issue number in the commit can "spam"
177 the issue in question.
178
179 [labeling]: ./rustbot.md#issue-relabeling
180 [closing-keywords]: https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue
181
182 ### External Dependencies (subtree)
183
184 As a developer to this repository, you don't have to treat the following external projects
185 differently from other crates that are directly in this repo:
186
187 * [Clippy](https://github.com/rust-lang/rust-clippy)
188 * [rustfmt](https://github.com/rust-lang/rustfmt)
189
190 In contrast to `submodule` dependencies
191 (see below for those), the `subtree` dependencies are just regular files and directories which can
192 be updated in tree. However, enhancements, bug fixes, etc. specific to these tools should be filed
193 against the tools directly in their respective upstream repositories.
194
195 #### Synchronizing a subtree
196
197 Periodically the changes made to subtree based dependencies need to be synchronized between this
198 repository and the upstream tool repositories.
199
200 Subtree synchronizations are typically handled by the respective tool maintainers. Other users
201 are welcome to submit synchronization PRs, however, in order to do so you you will need to modify
202 your local git installation and follow a very precise set of instructions.
203 These instructions are documented, along with several useful tips and tricks, in the
204 [syncing subtree changes][clippy-sync-docs] section in Clippy's Contributing guide.
205 The instructions are applicable for use with any subtree based tool, just be sure to
206 use the correct corresponding subtree directory and remote repository.
207
208 The synchronization process goes in two directions: `subtree push` and `subtree pull`.
209
210 A `subtree push` takes all the changes that happened to the copy in this repo and creates commits
211 on the remote repo that match the local changes. Every local
212 commit that touched the subtree causes a commit on the remote repo, but
213 is modified to move the files from the specified directory to the tool repo root.
214
215 A `subtree pull` takes all changes since the last `subtree pull`
216 from the tool repo and adds these commits to the rustc repo along with a merge commit that moves
217 the tool changes into the specified directory in the Rust repository.
218
219 It is recommended that you always do a push first and get that merged to the tool master branch.
220 Then, when you do a pull, the merge works without conflicts.
221 While it's definitely possible to resolve conflicts during a pull, you may have to redo the conflict
222 resolution if your PR doesn't get merged fast enough and there are new conflicts. Do not try to
223 rebase the result of a `git subtree pull`, rebasing merge commits is a bad idea in general.
224
225 You always need to specify the `-P` prefix to the subtree directory and the corresponding remote
226 repository. If you specify the wrong directory or repository
227 you'll get very fun merges that try to push the wrong directory to the wrong remote repository.
228 Luckily you can just abort this without any consequences by throwing away either the pulled commits
229 in rustc or the pushed branch on the remote and try again. It is usually fairly obvious
230 that this is happening because you suddenly get thousands of commits that want to be synchronized.
231
232 [clippy-sync-docs]: https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md#syncing-changes-between-clippy-and-rust-langrust
233
234 #### Creating a new subtree dependency
235
236 If you want to create a new subtree dependency from an existing repository, call (from this
237 repository's root directory!)
238
239 ```
240 git subtree add -P src/tools/clippy https://github.com/rust-lang/rust-clippy.git master
241 ```
242
243 This will create a new commit, which you may not rebase under any circumstances! Delete the commit
244 and redo the operation if you need to rebase.
245
246 Now you're done, the `src/tools/clippy` directory behaves as if Clippy were
247 part of the rustc monorepo, so no one but you (or others that synchronize
248 subtrees) actually needs to use `git subtree`.
249
250
251 ### External Dependencies (submodules)
252
253 Currently building Rust will also build the following external projects:
254
255 * [miri](https://github.com/rust-lang/miri)
256 * [rls](https://github.com/rust-lang/rls/)
257
258 We allow breakage of these tools in the nightly channel. Maintainers of these
259 projects will be notified of the breakages and should fix them as soon as
260 possible.
261
262 After the external is fixed, one could add the changes with
263
264 ```sh
265 git add path/to/submodule
266 ```
267
268 outside the submodule.
269
270 In order to prepare your tool-fixing PR, you can run the build locally by doing
271 `./x.py build src/tools/TOOL`. If you will be editing the sources
272 there, you may wish to set `submodules = false` in the `config.toml`
273 to prevent `x.py` from resetting to the original branch.
274
275 Breakage is not allowed in the beta and stable channels, and must be addressed
276 before the PR is merged.
277
278 #### Breaking Tools Built With The Compiler
279
280 Rust's build system builds a number of tools that make use of the internals of
281 the compiler and that are hosted in a separate repository, and included in Rust
282 via git submodules. This includes [RLS](https://github.com/rust-lang/rls) and
283 [Miri](https://github.com/rust-lang/Miri). If these tools break because of your
284 changes, you may run into a sort of "chicken and egg" problem. These tools rely
285 on the latest compiler to be built so you can't update them (in their own
286 repositories) to reflect your changes to the compiler until those changes are
287 merged into the compiler. At the same time, you can't get your changes merged
288 into the compiler because the rust-lang/rust build won't pass until those tools
289 build and pass their tests.
290
291 Luckily, a feature was
292 [added to Rust's build](https://github.com/rust-lang/rust/issues/45861) to make
293 all of this easy to handle. The idea is that we allow these tools to be
294 "broken", so that the rust-lang/rust build passes without trying to build them,
295 then land the change in the compiler, and go update the tools that you
296 broke. Some tools will require waiting for a nightly release before this can
297 happen, while others use the builds uploaded after each bors merge and thus can
298 be updated immediately (check the tool's documentation for details). Once you're
299 done and the tools are working again, you go back in the compiler and update the
300 tools so they can be distributed again.
301
302 This should avoid a bunch of synchronization dances and is also much easier on contributors as
303 there's no need to block on rls/miri/other tools changes going upstream.
304
305 Here are those same steps in detail:
306
307 1. (optional) First, if it doesn't exist already, create a `config.toml` by copying
308 `config.toml.example` in the root directory of the Rust repository.
309 Set `submodules = false` in the `[build]` section. This will prevent `x.py`
310 from resetting to the original branch after you make your changes. If you
311 need to [update any submodules to their latest versions](#updating-submodules),
312 see the section of this file about that for more information.
313 2. (optional) Run `./x.py test src/tools/rls` (substituting the submodule
314 that broke for `rls`). Fix any errors in the submodule (and possibly others).
315 3. (optional) Make commits for your changes and send them to upstream repositories as a PR.
316 4. (optional) Maintainers of these submodules will **not** merge the PR. The PR can't be
317 merged because CI will be broken. You'll want to write a message on the PR referencing
318 your change, and how the PR should be merged once your change makes it into a nightly.
319 5. Wait for your PR to merge.
320 6. Wait for a nightly
321 7. (optional) Help land your PR on the upstream repository now that your changes are in nightly.
322 8. (optional) Send a PR to rust-lang/rust updating the submodule.
323
324 #### Updating submodules
325
326 These instructions are specific to updating `rls`, however they may apply
327 to the other submodules as well. Please help by improving these instructions
328 if you find any discrepancies or special cases that need to be addressed.
329
330 To update the `rls` submodule, start by running the appropriate
331 [`git submodule` command](https://git-scm.com/book/en/v2/Git-Tools-Submodules).
332 For example, to update to the latest commit on the remote master branch,
333 you may want to run:
334 ```
335 git submodule update --remote src/tools/rls
336 ```
337 If you run `./x.py build` now, and you are lucky, it may just work. If you see
338 an error message about patches that did not resolve to any crates, you will need
339 to complete a few more steps which are outlined with their rationale below.
340
341 *(This error may change in the future to include more information.)*
342 ```
343 error: failed to resolve patches for `https://github.com/rust-lang/rls`
344
345 Caused by:
346 patch for `rls` in `https://github.com/rust-lang/rls` did not resolve to any crates
347 failed to run: ~/rust/build/x86_64-unknown-linux-gnu/stage0/bin/cargo build --manifest-path ~/rust/src/bootstrap/Cargo.toml
348 ```
349
350 The [`[patch]`][patchsec] section of `Cargo.toml` can be very useful for
351 testing. In addition to that, you should read the [Overriding
352 dependencies][overriding] section of the documentation.
353
354 [patchsec]: http://doc.crates.io/manifest.html#the-patch-section
355 [overriding]: http://doc.crates.io/specifying-dependencies.html#overriding-dependencies
356
357 Specifically, the following [section in Overriding dependencies][testingbugfix]
358 reveals what the problem is:
359
360 [testingbugfix]: http://doc.crates.io/specifying-dependencies.html#testing-a-bugfix
361
362 > Next up we need to ensure that our lock file is updated to use this new
363 > version of uuid so our project uses the locally checked out copy instead of
364 > one from crates.io. The way `[patch]` works is that it'll load the dependency
365 > at ../path/to/uuid and then whenever crates.io is queried for versions of
366 > uuid it'll also return the local version.
367 >
368 > This means that the version number of the local checkout is significant and
369 > will affect whether the patch is used. Our manifest declared uuid = "1.0"
370 > which means we'll only resolve to >= 1.0.0, < 2.0.0, and Cargo's greedy
371 > resolution algorithm also means that we'll resolve to the maximum version
372 > within that range. Typically this doesn't matter as the version of the git
373 > repository will already be greater or match the maximum version published on
374 > crates.io, but it's important to keep this in mind!
375
376 This says that when we updated the submodule, the version number in our
377 `src/tools/rls/Cargo.toml` changed. The new version is different from
378 the version in `Cargo.lock`, so the build can no longer continue.
379
380 To resolve this, we need to update `Cargo.lock`. Luckily, cargo provides a
381 command to do this easily.
382
383 ```
384 $ cargo update -p rls
385 ```
386
387 This should change the version listed in `Cargo.lock` to the new version you updated
388 the submodule to. Running `./x.py build` should work now.
389
390 ## Writing Documentation
391
392 Documentation improvements are very welcome. The source of `doc.rust-lang.org`
393 is located in [`src/doc`] in the tree, and standard API documentation is generated
394 from the source code itself (e.g. [`lib.rs`]). Documentation pull requests function
395 in the same way as other pull requests.
396
397 [`src/doc`]: https://github.com/rust-lang/rust/tree/master/src/doc
398 [`lib.rs`]: https://github.com/rust-lang/rust/blob/master/library/std/src/lib.rs#L1
399
400 To find documentation-related issues, sort by the [A-docs label][adocs].
401
402 [adocs]: https://github.com/rust-lang/rust/issues?q=is%3Aopen%20is%3Aissue%20label%3AA-docs
403
404 You can find documentation style guidelines in [RFC 1574][rfc1574].
405
406 [rfc1574]: https://github.com/rust-lang/rfcs/blob/master/text/1574-more-api-documentation-conventions.md#appendix-a-full-conventions-text
407
408 In many cases, you don't need a full `./x.py doc --stage 2`, which will build
409 the entire stage 2 compiler and compile the various books published on
410 [doc.rust-lang.org][docs]. When updating documentation for the standard library,
411 first try `./x.py doc library/std`. If that fails, or if you need to
412 see the output from the latest version of `rustdoc`, add `--stage 1`.
413 Results should appear in `build/$TARGET/doc`.
414
415 [docs]: https://doc.rust-lang.org
416
417 You can also use `rustdoc` directly to check small fixes. For example,
418 `rustdoc src/doc/reference.md` will render reference to `doc/reference.html`.
419 The CSS might be messed up, but you can verify that the HTML is right.
420
421 ### Contributing to rustc-dev-guide
422
423 Contributions to the [rustc-dev-guide][rdg] are always welcome, and can be made directly at
424 [the rust-lang/rustc-dev-guide repo][rdgrepo].
425 The issue tracker in that repo is also a great way to find things that need doing.
426 There are issues for beginners and advanced compiler devs alike!
427
428 Just a few things to keep in mind:
429
430 - Please limit line length to 100 characters. This is enforced by CI, and you can run the checks
431 locally with `ci/check_line_lengths.sh`.
432
433 - When contributing text to the guide, please contextualize the information with some time period
434 and/or a reason so that the reader knows how much to trust or mistrust the information.
435 Aim to provide a reasonable amount of context, possibly including but not limited to:
436
437 - A reason for why the data may be out of date other than "change", as change is a constant across
438 the project.
439
440 - The date the comment was added, e.g. instead of writing _"Currently, ..."_
441 or _"As of now, ..."_, consider writing
442 _"As of January 2021, ..."_.
443 Try to format the date as `<MONTH> <YEAR>` to ease search.
444
445 - Additionally, include a machine-readable comment of the form `<!-- date:
446 2022-04 -->` (if the current month is April 2022). We have an automated
447 tool that uses these (in `ci/date-check`).
448
449 So, for the month of April 2022, the comment would look like: `As of <!--
450 date: 2022-04 --> April 2022`. Make sure to put the comment *between* `as of`
451 and `April 2022`; see [PR #1066][rdg#1066] for the rationale.
452
453 - A link to a relevant WG, tracking issue, `rustc` rustdoc page, or similar, that may provide
454 further explanation for the change process or a way to verify that the information is not
455 outdated.
456
457 - If a text grows rather long (more than a few page scrolls) or complicated (more than four
458 subsections) it might benefit from having a Table of Contents at the beginning, which you can
459 auto-generate by including the `<!-- toc -->` marker.
460
461 [rdg]: https://rustc-dev-guide.rust-lang.org/
462 [rdgrepo]: https://github.com/rust-lang/rustc-dev-guide
463 [rdg#1066]: https://github.com/rust-lang/rustc-dev-guide/pull/1066
464
465 ## Issue Triage
466
467 Sometimes, an issue will stay open, even though the bug has been fixed. And
468 sometimes, the original bug may go stale because something has changed in the
469 meantime.
470
471 It can be helpful to go through older bug reports and make sure that they are
472 still valid. Load up an older issue, double check that it's still true, and
473 leave a comment letting us know if it is or is not. The [least recently
474 updated sort][lru] is good for finding issues like this.
475
476 [Thanks to `@rustbot`][rustbot], anyone can help triage issues by adding
477 appropriate labels to issues that haven't been triaged yet:
478
479 * Yellow, **A**-prefixed labels state which **area** of the project an issue
480 relates to.
481
482 * Magenta, **B**-prefixed labels identify bugs which are **blockers**.
483
484 * Dark blue, **beta-** labels track changes which need to be backported into
485 the beta branches.
486
487 * Light purple, **C**-prefixed labels represent the **category** of an issue.
488
489 * Green, **E**-prefixed labels explain the level of **experience** necessary
490 to fix the issue.
491
492 * The dark blue **final-comment-period** label marks bugs that are using the
493 RFC signoff functionality of [rfcbot] and are currently in the final
494 comment period.
495
496 * Red, **I**-prefixed labels indicate the **importance** of the issue. The
497 [I-nominated][inom] label indicates that an issue has been nominated for
498 discussion at the next meeting of the team tagged using a
499 **T**-prefixed label. Similarly, the [I-prioritize][ipri] indicates
500 that an issue has been requested to be prioritized by the appropriate
501 team.
502
503 * The purple **metabug** label marks lists of bugs collected by other
504 categories.
505
506 * Purple gray, **O**-prefixed labels are the **operating system** or platform
507 that this issue is specific to.
508
509 * Orange, **P**-prefixed labels indicate a bug's **priority**. These labels
510 can be assigned by anyone that understand the issue and is able to
511 prioritize it, and replace the [I-prioritize][ipri] label.
512
513 * The gray **proposed-final-comment-period** label marks bugs that are using
514 the RFC signoff functionality of [rfcbot] and are currently awaiting
515 signoff of all team members in order to enter the final comment period.
516
517 * Pink, **regression**-prefixed labels track regressions from stable to the
518 release channels.
519
520 * The light orange **relnotes** label marks issues that should be documented in
521 the release notes of the next release.
522
523 * Gray, **S**-prefixed labels are used for tracking the **status** of pull
524 requests.
525
526 * Blue, **T**-prefixed bugs denote which **team** the issue belongs to.
527
528 If you're looking for somewhere to start, check out the [E-easy][eeasy] tag.
529
530 [rustbot]: ./rustbot.md
531 [inom]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AI-nominated
532 [ipri]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AI-prioritize
533 [eeasy]: https://github.com/rust-lang/rust/issues?q=is%3Aopen+is%3Aissue+label%3AE-easy
534 [lru]: https://github.com/rust-lang/rust/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-asc
535 [rfcbot]: https://github.com/anp/rfcbot-rs/
536
537 ## Out-of-tree Contributions
538
539 There are a number of other ways to contribute to Rust that don't deal with
540 rust-lang/rust:
541
542 * Answer questions in the _Get Help!_ channels on the [Rust Discord
543 server][rust-discord], on [users.rust-lang.org][users], or on
544 [StackOverflow][so].
545 * Participate in the [RFC process](https://github.com/rust-lang/rfcs).
546 * Find a [requested community library][community-library], build it, and publish
547 it to [Crates.io](http://crates.io). Easier said than done, but very, very
548 valuable!
549
550 [rust-discord]: https://discord.gg/rust-lang
551 [users]: https://users.rust-lang.org/
552 [so]: http://stackoverflow.com/questions/tagged/rust
553 [community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library
554
555 ## Helpful Links and Information
556
557 For people new to Rust, and just starting to contribute, or even for
558 more seasoned developers, some useful places to look for information
559 are:
560
561 * This guide contains information about how various parts of the
562 compiler work and how to contribute to the compiler
563 * [Rust Forge][rustforge] contains additional documentation, including
564 write-ups of how to achieve common tasks
565 * The [Rust Internals forum][rif], a place to ask questions and
566 discuss Rust's internals
567 * The [generated documentation for Rust's compiler][gdfrustc]
568 * The [Rust reference][rr], even though it doesn't specifically talk about
569 Rust's internals, is a great resource nonetheless
570 * Although out of date, [Tom Lee's great blog article][tlgba] is very helpful
571 * [rustaceans.org][ro] is helpful, but mostly dedicated to IRC
572 * The [Rust Compiler Testing Docs][rctd]
573 * For [@bors], [this cheat sheet][cheatsheet] is helpful
574 * Google is always helpful when programming.
575 You can [search all Rust documentation][gsearchdocs] (the standard library,
576 the compiler, the books, the references, and the guides) to quickly find
577 information about the language and compiler.
578 * You can also use Rustdoc's built-in search feature to find documentation on
579 types and functions within the crates you're looking at. You can also search
580 by type signature! For example, searching for `* -> vec` should find all
581 functions that return a `Vec<T>`.
582 _Hint:_ Find more tips and keyboard shortcuts by typing `?` on any Rustdoc
583 page!
584 * Don't be afraid to ask! The Rust community is friendly and helpful.
585
586 [rustc dev guide]: https://rustc-dev-guide.rust-lang.org/about-this-guide.html
587 [gdfrustc]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle/
588 [gsearchdocs]: https://www.google.com/search?q=site:doc.rust-lang.org+your+query+here
589 [stddocs]: https://doc.rust-lang.org/std
590 [rif]: http://internals.rust-lang.org
591 [rr]: https://doc.rust-lang.org/book/README.html
592 [rustforge]: https://forge.rust-lang.org/
593 [tlgba]: https://tomlee.co/2014/04/a-more-detailed-tour-of-the-rust-compiler/
594 [ro]: https://www.rustaceans.org/
595 [rctd]: https://rustc-dev-guide.rust-lang.org/tests/intro.html
596 [cheatsheet]: https://bors.rust-lang.org/