@@ -44,86 +44,9 @@ just create noise, so we ask that you be mindful of the fact that the
4444
4545## Cloning and Building
4646
47- ### System Requirements
47+ See [ "How to build and run the compiler" ] ( ./building//how-to-build-and-run.md ) .
4848
49- Internet access is required.
50-
51- The most notable software requirement is that you will need Python 2 or 3, but
52- there are various others.
53-
54- The following hardware is recommended.
55- * 30GB+ of free disk space.
56- * 8GB+ RAM
57- * 2+ cores
58-
59- More powerful machines will lead to much faster builds. There are various
60- strategies to work around lesser hardware in the following chapters.
61-
62- See [ this chapter] [ prereqs ] for more details about software and hardware prerequisites.
63-
64- [ prereqs ] : ./building/prerequisites.md
65-
66- ### Cloning
67-
68- You can just do a normal git clone:
69-
70- ``` sh
71- git clone https://github.com/rust-lang/rust.git
72- cd rust
73- ```
74-
75- ### ` x.py ` Intro
76-
77- ` rustc ` is a [ bootstrapping] compiler, which makes it more complex than a
78- typical Rust program. As a result, you cannot use Cargo to build it. Instead
79- you must use the special tool ` x.py ` . It is used for the things Cargo is
80- normally used for: building, testing, creating releases, formatting, etc.
81-
82- [ bootstrapping ] : ./building/bootstrapping.md
83-
84- ### Configuring the compiler
85-
86- In the top level of the repo:
87-
88- ``` sh
89- $ ./x.py setup
90- ```
91-
92- This will do some initialization and walk you through an interactive setup to
93- create ` config.toml ` , the primary configuration file.
94-
95- See [ this chapter] [ config ] for more info about configuration.
96-
97- [ config ] : ./building/how-to-build-and-run.md#create-a-configtoml
98-
99- ### Common ` x.py ` commands
100-
101- Here are the basic invocations of the ` x.py ` commands most commonly used when
102- working on ` rustc ` , ` std ` , ` rustdoc ` , and other tools.
103-
104- | Command | When to use it |
105- | --- | --- |
106- | ` ./x.py check ` | Quick check to see if most things compile; [ rust-analyzer can run this automatically for you] [ rust-analyzer ] |
107- | ` ./x.py build ` | Builds ` rustc ` , ` std ` , and ` rustdoc ` |
108- | ` ./x.py test ` | Runs all tests |
109- | ` ./x.py fmt ` | Formats all code |
110-
111- As written, these commands are reasonable starting points. However, there are
112- additional options and arguments for each of them that are worth learning for
113- serious development work. In particular, ` ./x.py build ` and ` ./x.py test `
114- provide many ways to compile or test a subset of the code, which can save a lot
115- of time.
116-
117- Also, note that ` x.py ` supports all kinds of path suffixes for ` compiler ` , ` library ` ,
118- and ` src/tools ` directories. So, you can simply run ` x.py test tidy ` instead of
119- ` x.py test src/tools/tidy ` . Or, ` x.py build std ` instead of ` x.py build library/std ` .
120-
121- [ rust-analyzer ] : ./building/suggested.html#configuring-rust-analyzer-for-rustc
122-
123- See the chapters on [ building] ( ./building/how-to-build-and-run.md ) ,
124- [ testing] ( ./tests/intro.md ) , and [ rustdoc] ( ./rustdoc.md ) for more details.
125-
126- ### Contributing code to other Rust projects
49+ ## Contributing code to other Rust projects
12750
12851There are a bunch of other projects that you can contribute to outside of the
12952` rust-lang/rust ` repo, including ` clippy ` , ` miri ` , ` chalk ` , and many others.
@@ -132,7 +55,7 @@ These repos might have their own contributing guidelines and procedures. Many
13255of them are owned by working groups (e.g. ` chalk ` is largely owned by
13356WG-traits). For more info, see the documentation in those repos' READMEs.
13457
135- ### Other ways to contribute
58+ ## Other ways to contribute
13659
13760There are a bunch of other ways you can contribute, especially if you don't
13861feel comfortable jumping straight into the large ` rust-lang/rust ` codebase.
@@ -311,8 +234,7 @@ which would also be useful in rustc development, see [The Rust Performance Book]
311234
312235## Other Resources
313236
314- - This guide: talks about how ` rustc ` works
315237- [ The t-compiler zulip] [ z ]
316238- [ The compiler's documentation (rustdocs)] ( https://doc.rust-lang.org/nightly/nightly-rustc/ )
317239- [ The Forge] ( https://forge.rust-lang.org/ ) has more documentation about various procedures.
318- - ` #contribute ` and ` #rustdoc ` on [ Discord] ( https://discord.gg/rust-lang ) .
240+ - ` #contribute ` and ` #wg-rustup ` on [ Discord] ( https://discord.gg/rust-lang ) .
0 commit comments