Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
72 commits
Select commit Hold shift + click to select a range
e191c5e
Make README more complete and easier to follow
jyn514 Aug 17, 2026
4db6ea9
dedup a bunch of stuff from the readme to the contributing guide page
jyn514 Aug 17, 2026
d2bdc50
Fix some typos
ada4a Aug 14, 2026
c0fbeac
Merge pull request #2978 from ada4a/patch-4
tshepang Aug 21, 2026
4a0c2c0
Merge pull request #2973 from jyn514/reorganize-readme
jyn514 Aug 21, 2026
dfad89f
Dedup a bunch of information that's already on Forge
jyn514 Aug 17, 2026
2851cbf
Merge pull request #2979 from jyn514/reorganize-readme
jieyouxu Aug 22, 2026
fe50815
Rename LTA to CTA
fmease Aug 22, 2026
ee1c73a
Merge pull request #2980 from fmease/rn-lta-to-cta
fmease Aug 22, 2026
ce524bd
Prepare for merging from rust-lang/rust
invalid-email-address Aug 24, 2026
cae2073
Merge ref 'da5114692c9e' from rust-lang/rust
invalid-email-address Aug 24, 2026
1d6abd3
Merge pull request #2981 from rust-lang/rustc-pull
tshepang Aug 24, 2026
ac677f3
Expand on MIR type checking, stub region uniquification.
fallible-algebra Aug 24, 2026
150a7c7
Merge pull request #2982 from fallible-algebra/types-overhaul/mir-tyck
fallible-algebra Aug 24, 2026
b6b4989
ci: bump gha checkout action to latest
tshepang Aug 27, 2026
6ab354d
Merge pull request #2984 from rust-lang/bump-check-version
tshepang Aug 27, 2026
6ad648f
fix "all x does is call ./x"
tshepang Aug 27, 2026
ee332aa
Merge pull request #2985 from rust-lang/tshepang-patch-1
tshepang Aug 27, 2026
6f4c240
Install cargo tools with locked dependencies
konstin Aug 20, 2026
9f0850a
touch-ups to "query system" chapter
jyn514 Aug 29, 2026
e1b066f
Merge pull request #2987 from jyn514/query-touchups
jyn514 Aug 29, 2026
99c21c0
Merge pull request #2986 from konstin/konsti/cargo-install-locked
jyn514 Aug 29, 2026
6e12c94
Add a central index of dev-guide reading club discussions
jyn514 Aug 29, 2026
ee7e981
fix warnings when linkcheck is disabled
jyn514 Aug 29, 2026
a98b839
fix outdated docs about what RA config `x setup` generates
jyn514 Aug 29, 2026
8fdb8e8
Merge pull request #2990 from jyn514/build-dirs
jyn514 Aug 29, 2026
a412c65
Merge pull request #2988 from jyn514/reading-club
jieyouxu Aug 29, 2026
7f0706a
add some more compiler internals videos
jyn514 Aug 29, 2026
335ec54
reorganize lectures into subsections
jyn514 Aug 29, 2026
546a3fd
Merge pull request #2992 from jyn514/videos
jyn514 Aug 29, 2026
b0a5058
mechanical typo fixes
jyn514 Aug 29, 2026
a3ed834
Merge pull request #2994 from jyn514/typo-fixes
jyn514 Aug 29, 2026
e3ae9c6
Add a chapter for contributing to the dev-guide itself
jyn514 Aug 29, 2026
3c7294b
Move "compiler documentation" contributing docs to their dedicated ch…
jyn514 Aug 29, 2026
6049a4f
Move general contribution guidance to getting-started.md
jyn514 Aug 29, 2026
294217a
Move "new feature" procedures to their dedicated chapter
jyn514 Aug 29, 2026
9a97447
Move performance guidance to tests/perf.md
jyn514 Aug 29, 2026
344615a
Replace moved procedures with compatibility links
jyn514 Aug 29, 2026
cba9f93
make contributing.md ordering make more sense
jyn514 Aug 29, 2026
c519124
add E-needs-test walkthrough
jyn514 Aug 29, 2026
2dc5412
call out that the test description is important
jyn514 Aug 29, 2026
0023d94
Merge pull request #2995 from jyn514/split-up-contributing-md
jyn514 Aug 31, 2026
e1de9cb
Merge pull request #2989 from jyn514/linkcheck-warnings
jyn514 Sep 1, 2026
954c2d8
add cross-link
jyn514 Sep 1, 2026
34995d2
Merge pull request #2996 from jyn514/needs-test-walkthrough
jyn514 Sep 1, 2026
114d222
mechanical move contributing.md -> pr-lifecycle
jyn514 Aug 29, 2026
d2916f7
reorganize pr-lifecycle sections
jyn514 Aug 29, 2026
8b9969d
move PR info from walkthrough to pr-lifecycle
jyn514 Aug 29, 2026
97ae997
deduplicate and mechanical fixes
jyn514 Aug 29, 2026
93cda05
Merge pull request rust-lang/rustc-dev-guide#2998 from jyn514/pr-life…
reddevilmidzy Sep 2, 2026
09d9afe
fix GitHub capitalization
reddevilmidzy Sep 2, 2026
5a96613
Merge pull request rust-lang/rustc-dev-guide#2999 from reddevilmidzy/gh
reddevilmidzy Sep 2, 2026
60dfe38
Change rust.override-allocator to build.allocator per rust pr 160100
laundmo Sep 3, 2026
c99012d
Merge pull request #3000 from laundmo/fix-override-allocator
BoxyUwU Sep 3, 2026
73e4196
sembr: update lockfile
tshepang Aug 27, 2026
745ce12
sembr: bit confusing when doc comment comes after attribute
tshepang Aug 27, 2026
89f003a
sembr: reduce indentation
tshepang Aug 27, 2026
b523687
sembr: closing tag can be on same line
tshepang Aug 27, 2026
5a84220
sembr: remove strange logic
tshepang Aug 27, 2026
3b53060
sembr: taste
tshepang Aug 27, 2026
dd8e047
sembr: more sensible
tshepang Aug 27, 2026
a715f9c
sembr
tshepang Sep 4, 2026
9e02fec
sembr src/borrow-check/type-check.md
tshepang Sep 4, 2026
4bd70b1
improve .md
tshepang Sep 4, 2026
8125a6f
sembr src/solve/coinduction.md
tshepang Sep 4, 2026
8e35924
sembr: me want to handle this... manual process for now
tshepang Sep 4, 2026
44db7a2
improve solve/coinduction.md
tshepang Sep 4, 2026
aeee361
sembr src/solve/the-solver.md
tshepang Sep 4, 2026
c4dae33
improve solve/the-solver.md
tshepang Sep 4, 2026
f16ea38
sembr src/the-parser.md
tshepang Sep 4, 2026
504507c
flow
tshepang Sep 4, 2026
3e203c4
Merge pull request #3002 from rust-lang/tshepang/misc
tshepang Sep 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions src/doc/rustc-dev-guide/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v5
- uses: actions/checkout@v7
with:
# linkcheck needs the base commit.
fetch-depth: 0
Expand Down Expand Up @@ -54,13 +54,19 @@ jobs:
- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
cargo install mdbook --version ${{ env.MDBOOK_VERSION }}
cargo install mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }}
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}
cargo install --locked mdbook --version ${{ env.MDBOOK_VERSION }}
cargo install --locked mdbook-linkcheck2 --version ${{ env.MDBOOK_LINKCHECK2_VERSION }}
cargo install --locked mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}

- name: Check build
run: ENABLE_LINKCHECK=1 mdbook build

- name: Check build with link checking disabled
run: |
output=$(mktemp)
mdbook build 2>&1 | tee "$output"
! grep -F "Broken pipe" "$output"

- name: Save cached Linkcheck
id: cache-linkcheck-save
if: ${{ !cancelled() && github.event_name == 'schedule' }}
Expand Down
2 changes: 1 addition & 1 deletion src/doc/rustc-dev-guide/.github/workflows/date-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

steps:
- name: Checkout repo
uses: actions/checkout@v5
uses: actions/checkout@v7

- name: Ensure Rust is up-to-date
run: |
Expand Down
67 changes: 47 additions & 20 deletions src/doc/rustc-dev-guide/README.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,18 @@
[![CI](https://github.com/rust-lang/rustc-dev-guide/actions/workflows/ci.yml/badge.svg)](https://github.com/rust-lang/rustc-dev-guide/actions/workflows/ci.yml)

## About the `rustc-dev-guide`

This is a collaborative effort to build a guide that explains how rustc works.
The aim of the guide is to help new contributors get oriented to rustc,
as well as to help more experienced folks in figuring out
some new part of the compiler that they haven't worked on before.

You may also find the [rustc API docs] useful.

Note that these are not intended as a guide; it's recommended that you search
for the docs you're looking for instead of reading them top to bottom.
For more information, see [About This Guide](./src/about-this-guide.md).

For documentation on developing the standard library, see
[`std-dev-guide`](https://std-dev-guide.rust-lang.org/).

### Contributing to the guide
## Contributing to the guide

The guide is useful today, but it has a lot of work still to go.

Expand All @@ -24,35 +23,28 @@ Just post a comment on the issue you would like to work on to make sure that we
accidentally duplicate work.
If you think something is missing, please open an issue about it!

**In general, if you don't know how the compiler works, that is not a
problem!** In that case, what we will do is to schedule a bit of time
for you to talk with someone who **does** know the code, or who wants
to pair with you and figure it out.
Then you can work on writing up what you learned.

In general, when writing about a particular part of the compiler's code, we
recommend that you link to the relevant parts of the [rustc API docs].
See below for instructions on [writing new docs](#editing-the-guide).

The guide has a much lower bar for what it takes for a PR to be merged.
Check out the forge documentation for [our policy][forge_policy].

[forge_policy]: https://forge.rust-lang.org/rustc-dev-guide/index.html#review-policy

### Build Instructions
## Build Instructions

To build a local static HTML site, install [`mdbook`](https://github.com/rust-lang/mdBook) with:

```
cargo install mdbook mdbook-linkcheck2 mdbook-mermaid
cargo install --locked mdbook mdbook-linkcheck2 mdbook-mermaid
```

and execute the following command in the root of the repository:

```
mdbook build --open
mdbook serve --open
```

The build files are found in the `book/html` directory.
For a one-off build, you can use `mdbook build`.

### Link Validations

Expand All @@ -65,11 +57,46 @@ following example.
ENABLE_LINKCHECK=1 mdbook serve
```

## Synchronizing josh subtree with rustc
## Editing the guide

### Where to start

**In general, if you don't know how the compiler works, that is not a
problem!** In that case, what we will do is to schedule a bit of time
for you to talk with someone who **does** know the code, or who wants
to pair with you and figure it out.
Then you can work on writing up what you learned.

### Layout

The dev-guide is organized as a normal [mdBook](https://rust-lang.github.io/mdBook/):
It has a `src/SUMMARY.md` table of contents, which links to individual pages under `src/`.
Configuration lives in `book.toml`.
Images are in `src/img`.
The build files are found in the `book/html` directory.

**NOTE: if you do not add a page to SUMMARY.md, it will not be shown!**

### While writing

See the guide itself for instructions on [writing new docs].

[writing new docs]: src/contributing-to-guide.md

## Maintaining the guide

### CI

Various tools are kept under `ci/`.
Check links with `mdbook-linkcheck2 --standalone`.
Check semantic line breaks with `cargo run --manifest-path ci/sembr/Cargo.toml src`.
Triage `<!-- date-check -->` annotations with `cargo run --manifest-path ci/date-check/Cargo.toml .`.

You can test those tools with `cargo test --manifest-path ci/<tool>/Cargo.toml`.

### Synchronizing josh subtree with rustc

This repository is linked to `rust-lang/rust` as a [josh](https://josh-project.github.io/josh/intro.html) subtree.
You can use the [rustc-josh-sync](https://github.com/rust-lang/josh-sync) tool to perform synchronization.

You can find a guide on how to perform the synchronization [here](./src/external-repos.md#synchronizing-a-josh-subtree).

[rustc API docs]: https://doc.rust-lang.org/nightly/nightly-rustc/rustc_middle
1 change: 1 addition & 0 deletions src/doc/rustc-dev-guide/book.toml
Original file line number Diff line number Diff line change
Expand Up @@ -96,3 +96,4 @@ warning-policy = "error"
"/ty_module/instantiating_binders.html" = "/ty-module/instantiating-binders.html"
"/ty_module/param_ty_const_regions.html" = "/ty-module/param-ty-const-regions.html"
"/typing_parameter_envs.html" = "typing-parameter-envs.html"
"/walkthrough.html" = "walkthroughs/test.html"
3 changes: 3 additions & 0 deletions src/doc/rustc-dev-guide/ci/linkcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ set_github_token() {

if [ -z "$ENABLE_LINKCHECK" ] ; then
echo "Skipping link check."
# mdBook writes the render context to extensions over stdin.
# Discard it so mdBook doesn't warn about a broken pipe.
cat > /dev/null
exit 0
fi

Expand Down
Loading
Loading