Skip to content

Commit a5985dc

Browse files
authored
Rollup merge of #102604 - anirudh24seven:anirudh_improve_bootrap_readme_readability, r=Mark-Simulacrum
Improve readability of bootstrap's README Improve readability of bootstrap's README by adding commas & minor changes
2 parents 5d2c29d + cddc643 commit a5985dc

File tree

1 file changed

+32
-32
lines changed

1 file changed

+32
-32
lines changed

src/bootstrap/README.md

+32-32
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# rustbuild - Bootstrapping Rust
22

33
This is an in-progress README which is targeted at helping to explain how Rust
4-
is bootstrapped and in general some of the technical details of the build
4+
is bootstrapped and in general, some of the technical details of the build
55
system.
66

77
## Using rustbuild
@@ -12,16 +12,16 @@ The rustbuild build system has a primary entry point, a top level `x.py` script:
1212
$ python ./x.py build
1313
```
1414

15-
Note that if you're on Unix you should be able to execute the script directly:
15+
Note that if you're on Unix, you should be able to execute the script directly:
1616

1717
```sh
1818
$ ./x.py build
1919
```
2020

2121
The script accepts commands, flags, and arguments to determine what to do:
2222

23-
* `build` - a general purpose command for compiling code. Alone `build` will
24-
bootstrap the entire compiler, and otherwise arguments passed indicate what to
23+
* `build` - a general purpose command for compiling code. Alone, `build` will
24+
bootstrap the entire compiler, and otherwise, arguments passed indicate what to
2525
build. For example:
2626

2727
```
@@ -38,7 +38,7 @@ The script accepts commands, flags, and arguments to determine what to do:
3838
./x.py build --stage 0 library/test
3939
```
4040

41-
If files are dirty that would normally be rebuilt from stage 0, that can be
41+
If files that would normally be rebuilt from stage 0 are dirty, the rebuild can be
4242
overridden using `--keep-stage 0`. Using `--keep-stage n` will skip all steps
4343
that belong to stage n or earlier:
4444

@@ -47,8 +47,8 @@ The script accepts commands, flags, and arguments to determine what to do:
4747
./x.py build --keep-stage 0
4848
```
4949

50-
* `test` - a command for executing unit tests. Like the `build` command this
51-
will execute the entire test suite by default, and otherwise it can be used to
50+
* `test` - a command for executing unit tests. Like the `build` command, this
51+
will execute the entire test suite by default, and otherwise, it can be used to
5252
select which test suite is run:
5353

5454
```
@@ -75,7 +75,7 @@ The script accepts commands, flags, and arguments to determine what to do:
7575
./x.py test src/doc
7676
```
7777

78-
* `doc` - a command for building documentation. Like above can take arguments
78+
* `doc` - a command for building documentation. Like above, can take arguments
7979
for what to document.
8080

8181
## Configuring rustbuild
@@ -110,12 +110,12 @@ compiler. What actually happens when you invoke rustbuild is:
110110
compiles the build system itself (this folder). Finally, it then invokes the
111111
actual `bootstrap` binary build system.
112112
2. In Rust, `bootstrap` will slurp up all configuration, perform a number of
113-
sanity checks (compilers exist for example), and then start building the
113+
sanity checks (whether compilers exist, for example), and then start building the
114114
stage0 artifacts.
115-
3. The stage0 `cargo` downloaded earlier is used to build the standard library
115+
3. The stage0 `cargo`, downloaded earlier, is used to build the standard library
116116
and the compiler, and then these binaries are then copied to the `stage1`
117117
directory. That compiler is then used to generate the stage1 artifacts which
118-
are then copied to the stage2 directory, and then finally the stage2
118+
are then copied to the stage2 directory, and then finally, the stage2
119119
artifacts are generated using that compiler.
120120

121121
The goal of each stage is to (a) leverage Cargo as much as possible and failing
@@ -149,7 +149,7 @@ like this:
149149
build/
150150

151151
# Location where the stage0 compiler downloads are all cached. This directory
152-
# only contains the tarballs themselves as they're extracted elsewhere.
152+
# only contains the tarballs themselves, as they're extracted elsewhere.
153153
cache/
154154
2015-12-19/
155155
2016-01-15/
@@ -172,22 +172,22 @@ build/
172172
# hand.
173173
x86_64-unknown-linux-gnu/
174174

175-
# The build artifacts for the `compiler-rt` library for the target this
176-
# folder is under. The exact layout here will likely depend on the platform,
177-
# and this is also built with CMake so the build system is also likely
178-
# different.
175+
# The build artifacts for the `compiler-rt` library for the target that
176+
# this folder is under. The exact layout here will likely depend on the
177+
# platform, and this is also built with CMake, so the build system is
178+
# also likely different.
179179
compiler-rt/
180180
build/
181181

182182
# Output folder for LLVM if it is compiled for this target
183183
llvm/
184184

185185
# build folder (e.g. the platform-specific build system). Like with
186-
# compiler-rt this is compiled with CMake
186+
# compiler-rt, this is compiled with CMake
187187
build/
188188

189189
# Installation of LLVM. Note that we run the equivalent of 'make install'
190-
# for LLVM to setup these folders.
190+
# for LLVM, to setup these folders.
191191
bin/
192192
lib/
193193
include/
@@ -206,18 +206,18 @@ build/
206206

207207
# Location where the stage0 Cargo and Rust compiler are unpacked. This
208208
# directory is purely an extracted and overlaid tarball of these two (done
209-
# by the bootstrapy python script). In theory the build system does not
209+
# by the bootstrap python script). In theory, the build system does not
210210
# modify anything under this directory afterwards.
211211
stage0/
212212

213-
# These to build directories are the cargo output directories for builds of
214-
# the standard library and compiler, respectively. Internally these may also
213+
# These to-build directories are the cargo output directories for builds of
214+
# the standard library and compiler, respectively. Internally, these may also
215215
# have other target directories, which represent artifacts being compiled
216216
# from the host to the specified target.
217217
#
218218
# Essentially, each of these directories is filled in by one `cargo`
219219
# invocation. The build system instruments calling Cargo in the right order
220-
# with the right variables to ensure these are filled in correctly.
220+
# with the right variables to ensure that these are filled in correctly.
221221
stageN-std/
222222
stageN-test/
223223
stageN-rustc/
@@ -232,8 +232,8 @@ build/
232232
# being compiled (e.g. after libstd has been built), *this* is used as the
233233
# sysroot for the stage0 compiler being run.
234234
#
235-
# Basically this directory is just a temporary artifact use to configure the
236-
# stage0 compiler to ensure that the libstd we just built is used to
235+
# Basically, this directory is just a temporary artifact used to configure the
236+
# stage0 compiler to ensure that the libstd that we just built is used to
237237
# compile the stage1 compiler.
238238
stage0-sysroot/lib/
239239

@@ -242,7 +242,7 @@ build/
242242
# system will link (using hard links) output from stageN-{std,rustc} into
243243
# each of these directories.
244244
#
245-
# In theory there is no extra build output in these directories.
245+
# In theory, there is no extra build output in these directories.
246246
stage1/
247247
stage2/
248248
stage3/
@@ -265,14 +265,14 @@ structure here serves two goals:
265265
depend on `std`, so libstd is a separate project compiled ahead of time
266266
before the actual compiler builds.
267267
2. Splitting "host artifacts" from "target artifacts". That is, when building
268-
code for an arbitrary target you don't need the entire compiler, but you'll
268+
code for an arbitrary target, you don't need the entire compiler, but you'll
269269
end up needing libraries like libtest that depend on std but also want to use
270270
crates.io dependencies. Hence, libtest is split out as its own project that
271271
is sequenced after `std` but before `rustc`. This project is built for all
272272
targets.
273273

274274
There is some loss in build parallelism here because libtest can be compiled in
275-
parallel with a number of rustc artifacts, but in theory the loss isn't too bad!
275+
parallel with a number of rustc artifacts, but in theory, the loss isn't too bad!
276276

277277
## Build tools
278278

@@ -285,13 +285,13 @@ appropriate libstd/libtest/librustc compile above.
285285

286286
## Extending rustbuild
287287

288-
So you'd like to add a feature to the rustbuild build system or just fix a bug.
288+
So, you'd like to add a feature to the rustbuild build system or just fix a bug.
289289
Great! One of the major motivational factors for moving away from `make` is that
290290
Rust is in theory much easier to read, modify, and write. If you find anything
291-
excessively confusing, please open an issue on this and we'll try to get it
292-
documented or simplified pronto.
291+
excessively confusing, please open an issue on this, and we'll try to get it
292+
documented or simplified, pronto.
293293

294-
First up, you'll probably want to read over the documentation above as that'll
294+
First up, you'll probably want to read over the documentation above, as that'll
295295
give you a high level overview of what rustbuild is doing. You also probably
296296
want to play around a bit yourself by just getting it up and running before you
297297
dive too much into the actual build system itself.
@@ -326,7 +326,7 @@ A 'major change' includes
326326
Changes that do not affect contributors to the compiler or users
327327
building rustc from source don't need an update to `VERSION`.
328328

329-
If you have any questions feel free to reach out on the `#t-infra` channel in
329+
If you have any questions, feel free to reach out on the `#t-infra` channel in
330330
the [Rust Zulip server][rust-zulip] or ask on internals.rust-lang.org. When
331331
you encounter bugs, please file issues on the rust-lang/rust issue tracker.
332332

0 commit comments

Comments
 (0)