1
1
# Documenting rustc
2
2
3
- You might want to build documentation of the various components
3
+ You might want to build documentation of the various components
4
4
available like the standard library. There’s two ways to go about this.
5
- You can run rustdoc directly on the file to make sure the HTML is
6
- correct, which is fast. Alternatively, you can build the documentation
7
- as part of the build process through x.py. Both are viable methods
5
+ You can run rustdoc directly on the file to make sure the HTML is
6
+ correct, which is fast. Alternatively, you can build the documentation
7
+ as part of the build process through x.py. Both are viable methods
8
8
since documentation is more about the content.
9
9
10
10
## Document everything
11
11
12
- ``` bash
13
- ./x.py doc
14
- ```
12
+ ``` ignore
13
+ ./x.py doc
14
+ ```
15
15
16
16
## If you want to avoid the whole Stage 2 build
17
17
18
- ``` bash
18
+ ``` ignore
19
19
./x.py doc --stage 1
20
20
```
21
21
@@ -24,10 +24,10 @@ and then it documents the files.
24
24
25
25
## Document specific components
26
26
27
- ``` bash
28
- ./x.py doc src/doc/book
29
- ./x.py doc src/doc/nomicon
30
- ./x.py doc src/doc/book src/libstd
27
+ ``` ignore
28
+ ./x.py doc src/doc/book
29
+ ./x.py doc src/doc/nomicon
30
+ ./x.py doc src/doc/book src/libstd
31
31
```
32
32
33
33
Much like individual tests or building certain components you can build only
@@ -41,14 +41,14 @@ But, when enabled, compiler documentation does include internal items.
41
41
42
42
Next open up config.toml and make sure these two lines are set to true:
43
43
44
- ``` bash
44
+ ``` toml
45
45
docs = true
46
46
compiler-docs = true
47
47
```
48
48
49
49
When you want to build the compiler docs as well run this command:
50
50
51
- ``` bash
51
+ ``` ignore
52
52
./x.py doc
53
53
```
54
54
@@ -59,4 +59,4 @@ and build the normally hidden compiler docs!
59
59
60
60
The documentation for the rust components are found at [ rustc doc] .
61
61
62
- [ rustc doc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
62
+ [ rustc doc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc/
0 commit comments