Skip to content

Commit daf3ed5

Browse files
committed
Add links to headers in README and CONTRIBUTING and dependencies to CONTRIBUTING
1 parent 51cd061 commit daf3ed5

File tree

2 files changed

+30
-0
lines changed

2 files changed

+30
-0
lines changed

CONTRIBUTING.md

+18
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# Contributing to Rust
2+
[contributing-to-rust]: #contributing-to-rust
23

34
Thank you for your interest in contributing to Rust! There are many ways to
45
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
2324
[coc]: https://www.rust-lang.org/conduct.html
2425

2526
## Feature Requests
27+
[feature-requests]: #feature-requests
2628

2729
To request a change to the way that the Rust language works, please open an
2830
issue in the [RFCs repository](https://github.com/rust-lang/rfcs/issues/new)
2931
rather than this one. New features and other significant language changes
3032
must go through the RFC process.
3133

3234
## Bug Reports
35+
[bug-reports]: #bug-reports
3336

3437
While bugs are unfortunate, they're a reality in software. We can't fix what we
3538
don't know about, so please report liberally. If you're not sure if something
@@ -80,6 +83,7 @@ $ RUST_BACKTRACE=1 rustc ...
8083
```
8184

8285
## The Build System
86+
[the-build-system]: #the-build-system
8387

8488
Rust's build system allows you to bootstrap the compiler, run tests &
8589
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].
9498
[bootstrap]: https://github.com/rust-lang/rust/tree/master/src/bootstrap/
9599

96100
### Configuration
101+
[configuration]: #configuration
97102

98103
Before you can start building the compiler you need to configure the build for
99104
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
125130
`./configure` - you may need to delete it for `config.toml` to work.
126131

127132
### 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
128138

129139
The build system uses the `x.py` script to control the build process. This script
130140
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.
194204
They are still available, but `x.py` is the recommended build system.
195205

196206
### Useful commands
207+
[useful-commands]: #useful-commands
197208

198209
Some common invocations of `x.py` are:
199210

@@ -234,6 +245,7 @@ Some common invocations of `x.py` are:
234245
code.
235246

236247
### Using your local build
248+
[using-local-build]: #using-local-build
237249

238250
If you use Rustup to manage your rust install, it has a feature called ["custom
239251
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
262274
rustdoc and libstd, which will allow rustdoc to be run with that toolchain.)
263275

264276
## Pull Requests
277+
[pull-requests]: #pull-requests
265278

266279
Pull requests are the primary mechanism we use to change Rust. GitHub itself
267280
has some [great documentation][pull-requests] on using the Pull Request feature.
@@ -326,6 +339,7 @@ it can be found
326339
[here](https://github.com/rust-lang/rust-wiki-backup/blob/master/Note-testsuite.md).
327340

328341
### External Dependencies
342+
[external-dependencies]: #external-dependencies
329343

330344
Currently building Rust will also build the following external projects:
331345

@@ -340,6 +354,7 @@ It can also be more convenient during development to set `submodules = false`
340354
in the `config.toml` to prevent `x.py` from resetting to the original branch.
341355

342356
## Writing Documentation
357+
[writing-documentation]: #writing-documentation
343358

344359
Documentation improvements are very welcome. The source of `doc.rust-lang.org`
345360
is located in `src/doc` in the tree, and standard API documentation is generated
@@ -370,6 +385,7 @@ reference to `doc/reference.html`. The CSS might be messed up, but you can
370385
verify that the HTML is right.
371386

372387
## Issue Triage
388+
[issue-triage]: #issue-triage
373389

374390
Sometimes, an issue will stay open, even though the bug has been fixed. And
375391
sometimes, the original bug may go stale because something has changed in the
@@ -437,6 +453,7 @@ If you're looking for somewhere to start, check out the [E-easy][eeasy] tag.
437453
[rfcbot]: https://github.com/dikaiosune/rust-dashboard/blob/master/RFCBOT.md
438454

439455
## Out-of-tree Contributions
456+
[out-of-tree-contributions]: #out-of-tree-contributions
440457

441458
There are a number of other ways to contribute to Rust that don't deal with
442459
this repository.
@@ -456,6 +473,7 @@ valuable!
456473
[community-library]: https://github.com/rust-lang/rfcs/labels/A-community-library
457474

458475
## Helpful Links and Information
476+
[helpful-info]: #helpful-info
459477

460478
For people new to Rust, and just starting to contribute, or even for
461479
more seasoned developers, some useful places to look for information

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,15 @@ standard library, and documentation.
66
[Rust]: https://www.rust-lang.org
77

88
## Quick Start
9+
[quick-start]: #quick-start
910

1011
Read ["Installation"] from [The Book].
1112

1213
["Installation"]: https://doc.rust-lang.org/book/second-edition/ch01-01-installation.html
1314
[The Book]: https://doc.rust-lang.org/book/index.html
1415

1516
## Building from Source
17+
[building-from-source]: #building-from-source
1618

1719
1. Make sure you have installed the dependencies:
1820

@@ -52,6 +54,7 @@ Read ["Installation"] from [The Book].
5254
[Cargo]: https://github.com/rust-lang/cargo
5355
5456
### Building on Windows
57+
[building-on-windows]: #building-on-windows
5558
5659
There are two prominent ABIs in use on Windows: the native (MSVC) ABI used by
5760
Visual Studio, and the GNU ABI used by the GCC toolchain. Which version of Rust
@@ -61,6 +64,7 @@ for interop with GNU software built using the MinGW/MSYS2 toolchain use the GNU
6164
build.
6265
6366
#### MinGW
67+
[windows-mingw]: #windows-mingw
6468
6569
[MSYS2][msys2] can be used to easily build Rust on Windows:
6670
@@ -101,6 +105,7 @@ build.
101105
```
102106

103107
#### MSVC
108+
[windows-msvc]: #windows-msvc
104109

105110
MSVC builds of Rust additionally require an installation of Visual Studio 2013
106111
(or later) so `rustc` can use its linker. Make sure to check the “C++ tools”
@@ -124,6 +129,7 @@ python x.py build
124129
```
125130

126131
#### Specifying an ABI
132+
[specifying-an-abi]: #specifying-an-abi
127133

128134
Each specific ABI can also be used from either environment (for example, using
129135
the GNU ABI in powershell) by using an explicit build triple. The available
@@ -141,6 +147,7 @@ in Building From Source), and modifying the `build` option under the `[build]`
141147
section.
142148

143149
### Configure and Make
150+
[configure-and-make]: #configure-and-make
144151

145152
While it's not the recommended build system, this project also provides a
146153
configure script and makefile (the latter of which just invokes `x.py`).
@@ -155,6 +162,7 @@ When using the configure script, the generated `config.mk` file may override the
155162
`config.mk` file.
156163

157164
## Building Documentation
165+
[building-documentation]: #building-documentation
158166

159167
If you’d like to build the documentation, it’s almost the same:
160168

@@ -167,6 +175,7 @@ the ABI used. I.e., if the ABI was `x86_64-pc-windows-msvc`, the directory will
167175
`build\x86_64-pc-windows-msvc\doc`.
168176

169177
## Notes
178+
[notes]: #notes
170179

171180
Since the Rust compiler is written in Rust, it must be built by a
172181
precompiled "snapshot" version of itself (made in an earlier state of
@@ -192,6 +201,7 @@ There is more advice about hacking on Rust in [CONTRIBUTING.md].
192201
[CONTRIBUTING.md]: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md
193202

194203
## Getting Help
204+
[getting-help]: #getting-help
195205

196206
The Rust community congregates in a few places:
197207

@@ -204,6 +214,7 @@ The Rust community congregates in a few places:
204214
[users.rust-lang.org]: https://users.rust-lang.org/
205215

206216
## Contributing
217+
[contributing]: #contributing
207218

208219
To contribute to Rust, please see [CONTRIBUTING](CONTRIBUTING.md).
209220

@@ -217,6 +228,7 @@ Rust. And a good place to ask for help would be [#rust-beginners].
217228
[#rust-beginners]: irc://irc.mozilla.org/rust-beginners
218229

219230
## License
231+
[license]: #license
220232

221233
Rust is primarily distributed under the terms of both the MIT license
222234
and the Apache License (Version 2.0), with portions covered by various

0 commit comments

Comments
 (0)