1
1
# Contributing to Rust
2
+ [ contributing-to-rust ] : #contributing-to-rust
2
3
3
4
Thank you for your interest in contributing to Rust! There are many ways to
4
5
contribute, and we appreciate all of them. This document is a bit long, so here's
@@ -23,13 +24,15 @@ As a reminder, all contributors are expected to follow our [Code of Conduct][coc
23
24
[ coc ] : https://www.rust-lang.org/conduct.html
24
25
25
26
## Feature Requests
27
+ [ feature-requests ] : #feature-requests
26
28
27
29
To request a change to the way that the Rust language works, please open an
28
30
issue in the [ RFCs repository] ( https://github.com/rust-lang/rfcs/issues/new )
29
31
rather than this one. New features and other significant language changes
30
32
must go through the RFC process.
31
33
32
34
## Bug Reports
35
+ [ bug-reports ] : #bug-reports
33
36
34
37
While bugs are unfortunate, they're a reality in software. We can't fix what we
35
38
don't know about, so please report liberally. If you're not sure if something
@@ -80,6 +83,7 @@ $ RUST_BACKTRACE=1 rustc ...
80
83
```
81
84
82
85
## The Build System
86
+ [ the-build-system ] : #the-build-system
83
87
84
88
Rust's build system allows you to bootstrap the compiler, run tests &
85
89
benchmarks, generate documentation, install a fresh build of Rust, and more.
@@ -94,6 +98,7 @@ system internals, try asking in [`#rust-internals`][pound-rust-internals].
94
98
[ bootstrap ] : https://github.com/rust-lang/rust/tree/master/src/bootstrap/
95
99
96
100
### Configuration
101
+ [ configuration ] : #configuration
97
102
98
103
Before you can start building the compiler you need to configure the build for
99
104
your system. In most cases, that will just mean using the defaults provided
@@ -125,6 +130,11 @@ file. If you still have a `config.mk` file in your directory - from
125
130
` ./configure ` - you may need to delete it for ` config.toml ` to work.
126
131
127
132
### Building
133
+ [ building ] : #building
134
+
135
+ Dependencies
136
+ - [ build dependencies] ( README.md#building-from-source )
137
+ - ` gdb ` 6.2.0 minimum, 7.1 or later recommended for test builds
128
138
129
139
The build system uses the ` x.py ` script to control the build process. This script
130
140
is used to build, test, and document various parts of the compiler. You can
@@ -194,6 +204,7 @@ Note: Previously `./configure` and `make` were used to build this project.
194
204
They are still available, but ` x.py ` is the recommended build system.
195
205
196
206
### Useful commands
207
+ [ useful-commands ] : #useful-commands
197
208
198
209
Some common invocations of ` x.py ` are:
199
210
@@ -234,6 +245,7 @@ Some common invocations of `x.py` are:
234
245
code.
235
246
236
247
### Using your local build
248
+ [ using-local-build ] : #using-local-build
237
249
238
250
If you use Rustup to manage your rust install, it has a feature called [ "custom
239
251
toolchains"] [ toolchain-link ] that you can use to access your newly-built compiler
@@ -262,6 +274,7 @@ stage 1. `python x.py build --stage 1 src/libstd src/tools/rustdoc` will build
262
274
rustdoc and libstd, which will allow rustdoc to be run with that toolchain.)
263
275
264
276
## Pull Requests
277
+ [ pull-requests ] : #pull-requests
265
278
266
279
Pull requests are the primary mechanism we use to change Rust. GitHub itself
267
280
has some [ great documentation] [ pull-requests ] on using the Pull Request feature.
@@ -326,6 +339,7 @@ it can be found
326
339
[ here] ( https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md ) .
327
340
328
341
### External Dependencies
342
+ [ external-dependencies ] : #external-dependencies
329
343
330
344
Currently building Rust will also build the following external projects:
331
345
@@ -350,6 +364,7 @@ It can also be more convenient during development to set `submodules = false`
350
364
in the ` config.toml ` to prevent ` x.py ` from resetting to the original branch.
351
365
352
366
## Writing Documentation
367
+ [ writing-documentation ] : #writing-documentation
353
368
354
369
Documentation improvements are very welcome. The source of ` doc.rust-lang.org `
355
370
is located in ` src/doc ` in the tree, and standard API documentation is generated
@@ -380,6 +395,7 @@ reference to `doc/reference.html`. The CSS might be messed up, but you can
380
395
verify that the HTML is right.
381
396
382
397
## Issue Triage
398
+ [ issue-triage ] : #issue-triage
383
399
384
400
Sometimes, an issue will stay open, even though the bug has been fixed. And
385
401
sometimes, the original bug may go stale because something has changed in the
@@ -447,6 +463,7 @@ If you're looking for somewhere to start, check out the [E-easy][eeasy] tag.
447
463
[ rfcbot ] : https://github.com/dikaiosune/rust-dashboard/blob/master/RFCBOT.md
448
464
449
465
## Out-of-tree Contributions
466
+ [ out-of-tree-contributions ] : #out-of-tree-contributions
450
467
451
468
There are a number of other ways to contribute to Rust that don't deal with
452
469
this repository.
@@ -466,6 +483,7 @@ valuable!
466
483
[ community-library ] : https://github.com/rust-lang/rfcs/labels/A-community-library
467
484
468
485
## Helpful Links and Information
486
+ [ helpful-info ] : #helpful-info
469
487
470
488
For people new to Rust, and just starting to contribute, or even for
471
489
more seasoned developers, some useful places to look for information
0 commit comments