Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rewrite bootstrapping stages #1650

Draft
wants to merge 2,045 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
2045 commits
Select commit Hold shift + click to select a range
2557089
make date-check more lightweight (#1394)
tshepang Aug 2, 2022
5c4b673
date-check: be more strict
tshepang Aug 2, 2022
e305a42
note is now too old to be relevant
tshepang Aug 7, 2022
6964f75
date-check: rustc_codegen_ssa is still alive
tshepang Aug 7, 2022
4b2f038
Add bootstrapping diagram
camelid Aug 9, 2022
c1c84d6
Add colors to diagram
camelid Aug 9, 2022
81a4d04
Add color for downloaded nodes
camelid Aug 9, 2022
df17432
Fix legend colors in dark mode
camelid Aug 9, 2022
1dee5f8
update date-check format on github issue (#1416)
tshepang Aug 9, 2022
f979af6
move references down to avoid clutter (#1420)
tshepang Aug 9, 2022
af80d31
add gdb tips for symbol-mangling-version
chenyukang Aug 10, 2022
4c39d33
Update src/compiler-debugging.md
jyn514 Aug 10, 2022
24de0fa
fix/improve compiler-debugging
tshepang Aug 10, 2022
452b5ab
date-check: crates-io
tshepang Aug 11, 2022
d3daa1f
Improve the "Diagnostic items" chapter (#1427)
tshepang Aug 13, 2022
04e1702
Update the date reference around Git submodule bug (#1430)
tshepang Aug 17, 2022
8ee1ff5
fix lifetime name (#1431)
tshepang Aug 17, 2022
47c8189
remove incorrect info (#1435)
tshepang Aug 17, 2022
2512667
Update slug style to use _ instead of - (#1426)
est31 Aug 17, 2022
9334d59
fix incorrect #[note] syntax
CleanCut Aug 18, 2022
0a80e53
more syntax fixes
CleanCut Aug 18, 2022
f3fe248
Add missing lifetime (#1439)
CleanCut Aug 19, 2022
0a61352
diagnostics: fix outdated use of string slugs (#1436)
davidtwco Aug 19, 2022
c2371da
Document changes introduced by kind-less SessionDiagnostics
Xiretza Aug 19, 2022
e81b583
fix quick-edit link (#1441)
tshepang Aug 22, 2022
18fc34b
do not offer option to run code (#1442)
tshepang Aug 22, 2022
1e7fe14
update thir output (#1445)
tshepang Aug 24, 2022
bedc610
make date-check more easy to use
tshepang Aug 14, 2022
b0a0a4f
address review comment
tshepang Aug 19, 2022
9c9882c
update parallel-rustc.md
SparrowLii Aug 15, 2022
a240e52
Correct some statements in parallel-rustc.md
SparrowLii Aug 16, 2022
1be023c
correct typo in parallel-rustc.md
SparrowLii Aug 16, 2022
d7832db
Update some statements
SparrowLii Aug 25, 2022
8ba0403
A few corrections
SparrowLii Aug 26, 2022
94a29d4
we got 3 (#1447)
tshepang Aug 26, 2022
20e571f
Updates LLVM prereqs since upgrade to C++17.
red1bluelost Aug 27, 2022
2bf1b9a
Updates text to refer to LLVM documentation.
red1bluelost Aug 27, 2022
daca468
typo
tshepang Aug 27, 2022
b5a632f
Refine the lintstore section (#1429)
tshepang Aug 27, 2022
2a9f8fb
Update the stabilization guide to refer to the new placeholder system
est31 Aug 23, 2022
c0c957c
Remove a dangling link on "The `#[test]` attribute"
JohnTitor Aug 29, 2022
04892c1
Fix the link to `Parser` struct
JohnTitor Aug 29, 2022
6b0a155
Update for removal of RLS (#1450)
ehuss Sep 2, 2022
8593238
Add reference for updating Windows PATH and fix typo
Samyak2 Aug 30, 2022
5be5475
Document multipart_suggestion derive on SessionSubdiagnostic
Xiretza Aug 24, 2022
a5363fb
Fix typo (#1459)
eholk Sep 9, 2022
5d8825e
Add symbol-addition to the how-to for new features (#1457)
ssbr Sep 11, 2022
f29e38c
"symbol names" => ABI
jyn514 Sep 10, 2022
c3232c4
Remove the diagram of all outputs generated by x.py
jyn514 Sep 10, 2022
6b3a5fb
Rewrite the section on passing flags to subcommands
jyn514 Sep 10, 2022
a605591
Say "bootstrap" instead of "rustbuild"; the latter is not explained a…
jyn514 Sep 10, 2022
290ecb9
fix typos and formatting
jyn514 Sep 12, 2022
f1609a3
Explain the new valtree system for type level constants. (#1097)
oli-obk Sep 13, 2022
b21b0bb
remove stray **
tshepang Sep 14, 2022
39612f9
Link from "implementing to new features" to mcp.md (#1465)
pnkfelix Sep 15, 2022
1f8cda6
Add a note about building `rust-analyzer-proc-macro-srv` (#1467)
WaffleLapkin Sep 19, 2022
f587d6e
Update stability guide to use CURRENT_RUSTC_VERSION (#1468)
SUPERCILEX Sep 19, 2022
f349ee1
Fix some typos
JohnTitor Sep 19, 2022
b8b984f
Update some actions versions
JohnTitor Sep 19, 2022
03752ab
Remove unmaintained action
JohnTitor Sep 19, 2022
27c2aa6
Update mdbook and its extensions versions
JohnTitor Sep 20, 2022
1c79085
UPDATE - Diagnostic docs to reflect renamed traits and macros in rust…
JhonnyBillM Sep 9, 2022
7743f0f
don't refer to the compile-time interpreter as "Miri" (#1471)
RalfJung Sep 26, 2022
ed11720
Update r-a config suggestions
Veykril Oct 1, 2022
1370793
Link to the correct page in "about this guide"
jyn514 Sep 3, 2022
de71812
Update about-this-guide.md
jyn514 Oct 2, 2022
882921a
fix typo and make paragraph consistent (#1474)
Joshument Oct 3, 2022
b8228e9
Rename typeck to hir_analysis (#1475)
mejrs Oct 4, 2022
d3ce60f
Update running tests with the new flags (#1476)
pietroalbini Oct 5, 2022
57a38ad
diagnostic structs: derive on enum (#1477)
davidtwco Oct 5, 2022
0932ad6
fix very minor punctuation typo
Joshument Oct 5, 2022
9a86c04
.gitattributes: Mark minified javascript as binary to filter greps
joshtriplett Oct 7, 2022
509ee50
Use llvm subdomain for compiler-explorer link
dkm Oct 8, 2022
7518c34
Update debugging.md
dkm Oct 8, 2022
e68dfb8
Add missing prerequisite for some Linux distros (#1481)
scarvalhojr Oct 11, 2022
a8ccc26
typo and grammar (#1484)
tshepang Oct 18, 2022
736fcb9
fix some links (#1490)
lcnr Oct 22, 2022
0a2f713
miri is no longer a submodule but a subtree. (#1488)
luqmana Oct 22, 2022
a262476
Update rust-analyzer suggestions (#1487)
Veykril Oct 24, 2022
6686b1e
Update diagnostics to flat fluent message paths
Noratrieb Oct 21, 2022
51a37ad
Update `traits/resolution.md` (#1494)
compiler-errors Oct 25, 2022
7f426da
Update for highfive transition.
ehuss Oct 26, 2022
bd8eeff
Remove `--bless` from pre-push hook suggestion
ChrisDenton Oct 27, 2022
88bd6ca
add note for err annotation formatting
Rageking8 Oct 27, 2022
94ecbac
trans -> codegen (#1500)
spastorino Oct 31, 2022
03fe2d4
UPDATE - mention of Diagnostic derive on enums
JhonnyBillM Oct 31, 2022
a6c35fc
Fixes some typos (#1502)
jonathanCogan Nov 2, 2022
43e4117
align code blocks with their paragraphs
tshepang Nov 4, 2022
2bdb02c
replace tabs with spaces (#1504)
tshepang Nov 5, 2022
0872241
Update query.md
Noratrieb Oct 14, 2022
090bd54
Update some more things and improve wording
Noratrieb Nov 5, 2022
63b45c3
Remove implementation details
Noratrieb Nov 5, 2022
d0dc6c9
trans -> codegen
lcnr Nov 7, 2022
01a51b2
Document multiple alternative suggestions on diagnostic structs (#1486)
Xiretza Nov 8, 2022
7354b42
Consistent ordered list indexing
RCoder01 Nov 8, 2022
39c10de
extract regions
lcnr Nov 7, 2022
36e15ae
Update src/type-inference.md
lcnr Nov 9, 2022
6f3d5e4
date-check: updating-llvm (#1424)
tshepang Nov 20, 2022
f98f1e5
updating-llvm: keep a calm tone (#1449)
tshepang Nov 20, 2022
32bc13e
Fix a broken design docs link about unused substs bug
JohnTitor Nov 20, 2022
0bd5bd1
Update path for `try_mark_green` implementation
ghassanachi Nov 22, 2022
2889c29
Triage some date-check items (#1513)
camelid Nov 26, 2022
e85c4c4
do an actual link to detect if it breaks in future (#1517)
tshepang Nov 27, 2022
af134d2
Link directly to the section on `--keep-stage`
jyn514 Nov 25, 2022
fa3ffbf
Don't use "incremental" to refer to `--keep-stage`
jyn514 Nov 26, 2022
96462f2
Fix broken link
jyn514 Nov 27, 2022
c4e632e
Typo (#1520)
smoelius Dec 3, 2022
a7cd864
clarify subtree tool policy (#1518)
RalfJung Dec 3, 2022
e269950
Remove duplicate paragraph (#1523)
anirudh24seven Dec 3, 2022
d3564ba
Fix small inaccuracy in monomorph page
nameEqualsJared Dec 5, 2022
d147c52
Remove TyS
oli-obk Dec 6, 2022
b145e1e
fix: Fix broken links
JohnTitor Dec 3, 2022
3b98da0
chore: Update `actions/github-script` to v6
JohnTitor Dec 3, 2022
9f3efe6
share same link
tshepang Dec 9, 2022
1211eeb
Replace NoLandingPad with another alive MIR pass
momvart Dec 13, 2022
1cf62dd
Remove todo note
momvart Dec 13, 2022
4c516b0
Replace NoLandingPad with another alive Visitor
momvart Dec 13, 2022
55c2c09
typo
tshepang Dec 14, 2022
58077bf
Add documentation for LLVM KCFI support (#1529)
rcvalle Dec 14, 2022
a213de4
Add -Ztrack-diagnostics information
Nov 5, 2022
8b42eb5
Apply feedback
Dec 17, 2022
54e6f5b
Fix rustc_borrowck crate name typo (#1535)
dmezh Dec 25, 2022
ba1db24
Add more rebasing help
jyn514 Dec 29, 2022
586474f
Use `origin` consistently and add an example of rebasing over the wro…
jyn514 Dec 29, 2022
e6fd600
Replace `$TARGET` with `host`
jyn514 Nov 25, 2022
8fa9ede
Remove initial section on submodules
jyn514 Dec 8, 2022
fd9a461
Remove unnecessary detail in building chapter
jyn514 Dec 8, 2022
f111b88
Move "create a config.toml" after the section explaning x.py
jyn514 Dec 8, 2022
51fc2ec
Move information about dependencies to the rust-lang/rust readme
jyn514 Dec 8, 2022
ef12db3
Update sentence about LLVM to match the new defaults
jyn514 Dec 8, 2022
664346d
Give help for when you update a submodule by accident
jyn514 Dec 31, 2022
b3e2a6e
fix typo
jyn514 Dec 31, 2022
da0a4a0
Add a section for how to review code more easily (#1538)
jyn514 Jan 2, 2023
d89d417
fix rebase link
oskgo Jan 9, 2023
e67f3b8
Fix incorrect links (#1549)
mu001999 Jan 10, 2023
e799c10
add full name for ICE (#1552)
gftea Jan 11, 2023
ec0d134
Change `src/test` to `tests` (#1547)
albertlarsan68 Jan 12, 2023
0dc2b03
Link to the youtube recording of my talk, not the summary (#1554)
jyn514 Jan 12, 2023
de053e2
Update incremental-compilation-in-detail.md (#1553)
gftea Jan 14, 2023
7352353
fix examples for rustc 1.68.0-nightly (935dc0721 2022-12-19) (#1556) …
gftea Jan 14, 2023
ea33f70
Update asm.md (#1560)
gftea Jan 17, 2023
7313897
Update resolution.md (#1561)
gftea Jan 17, 2023
7d3c1c8
Correct tests misplacement (#1564)
albertlarsan68 Jan 20, 2023
042c49c
rustc_typeck exists no more
tshepang Jan 15, 2023
757ad6d
accept review suggestion
tshepang Jan 17, 2023
5ecd75a
fix review suggestion
tshepang Jan 17, 2023
b6cc460
Update hir.md
pourplusquoi Jan 25, 2023
0e18184
bumpt date-check examples to current month (#1566)
tshepang Jan 26, 2023
21c77d7
there are still no locale bundles (#1567)
tshepang Jan 26, 2023
f4f78f7
version 5 is now not supported (#1568)
tshepang Jan 27, 2023
0bcdb56
add section for the new trait solver
lcnr Jan 10, 2023
61771df
fix line lengths
lcnr Jan 10, 2023
15bd9e4
Update src/solve/canonicalization.md
lcnr Jan 12, 2023
9656b8c
review
lcnr Jan 12, 2023
7eaff60
Update src/solve/canonicalization.md
lcnr Jan 13, 2023
167d22c
line length
lcnr Jan 13, 2023
71766d9
review
lcnr Jan 27, 2023
c166632
update datecheck
lcnr Jan 27, 2023
566124f
Use ephemeral PAT for linkcheck
JohnTitor Jan 27, 2023
54cfdd7
Update ast-validation.md
dbelik Dec 4, 2022
4a1d549
Apply suggestions from code review
dbelik Dec 10, 2022
e359ee2
New infcx usage (#1571)
Noratrieb Jan 30, 2023
472188e
extend bootstrap related documentations
onur-ozkan Jan 20, 2023
ba809ff
fix incorrect position of topic
onur-ozkan Jan 31, 2023
c42c13e
fix wrong heading level (#1573)
tshepang Jan 31, 2023
c97f571
Update rustfmt path
zephaniahong Feb 1, 2023
98cc718
Add section on comparing types
Noratrieb Jan 28, 2023
5db974f
Expand section basedd on review comments
Noratrieb Jan 30, 2023
49c93f6
Add param_env and wording
Noratrieb Feb 2, 2023
d8c298d
Update explnation about benchmarks
JohnTitor Feb 2, 2023
d30be86
Address the change in https://github.com/rust-lang/rust/pull/107256
JohnTitor Feb 2, 2023
e0074c1
Address the change in https://github.com/rust-lang/rust/pull/97287
JohnTitor Feb 2, 2023
860162a
Address the change in https://github.com/rust-lang/rust/pull/106718
JohnTitor Feb 2, 2023
bf4cdde
Address the change in https://github.com/rust-lang/rust/pull/99715
JohnTitor Feb 2, 2023
d579acb
Fix broken relative links
JohnTitor Feb 2, 2023
5c65222
Use host symlink for custom rustup toolchain
aDotInTheVoid Feb 3, 2023
2d1e71a
update bootstrap guide (#1583)
onur-ozkan Feb 4, 2023
0591410
Fixed small grammar mistake in monomorph.md (#1585)
Ciel-MC Feb 5, 2023
7e9449a
Do not add accept header on linkcheck
JohnTitor Feb 5, 2023
ed5b175
Replace settings.json with x.py setup note (#1588)
clubby789 Feb 8, 2023
33ea559
update examples for rustc 1.69.0-nightly (e1eaa2d5d 2023-02-06) (#1590)
Hiroki6 Feb 9, 2023
df5aee0
Improve git submodule help (#1587)
jyn514 Feb 9, 2023
41a96ab
Add a citation file
JohnTitor Jan 10, 2023
2ab6fbc
Add Neovim configuration information (#1545)
RossSmyth Feb 14, 2023
5eb8171
Fix a typo (#1597)
tshepang Feb 14, 2023
82257c2
use actual names (#1594)
tshepang Feb 14, 2023
c9e4cb7
typo (#1600)
tshepang Feb 15, 2023
77aaf99
Add sample CodeLLDB launch.json (#1482)
AE1020 Feb 15, 2023
fb4cc6f
howto run the examples (#1593)
tshepang Feb 15, 2023
d0ee17f
avoid code duplication by including files in docs (#1598)
tshepang Feb 15, 2023
74afdfc
Add link to vscode settings in Rust repo (#1591)
clubby789 Feb 15, 2023
4a86a8d
Typo
mikysett Feb 15, 2023
df7970b
Typo
mikysett Feb 15, 2023
fdacc77
remove stray text (#1604)
tshepang Feb 17, 2023
2c113b3
have checkboxes only point to date-check lines in files (#1603)
tshepang Feb 17, 2023
c80a26f
make use of the symlink, to ease things (#1608)
tshepang Feb 17, 2023
ed87804
rustc_codegen_ssa feels permanent enough not to need date-check
tshepang Feb 17, 2023
4e8110c
address review comment
tshepang Feb 17, 2023
1f4d6ac
accept review suggestion
tshepang Feb 17, 2023
91d8bbe
Bump dependencies to fix CI (#1610)
camelid Feb 18, 2023
1a72161
Explain what the rest of the backend agnostic page is about
camelid Feb 17, 2023
64f1af1
lower-case "Compiler" in headings, for consistency (and looks)
tshepang Feb 17, 2023
6f536e4
impl review suggestion
tshepang Feb 18, 2023
8715e8f
fix and clarify llvm bugfix policy (#1611)
tshepang Feb 18, 2023
b328f82
add Dev Desktops note
tshepang Feb 18, 2023
727941f
fmt
tshepang Feb 18, 2023
5173d1f
accept review suggestion
tshepang Feb 18, 2023
84b9f4d
Vetting deps datecheck (#1614)
tshepang Feb 18, 2023
51dca6a
enable AND search (#1607)
tshepang Feb 18, 2023
99b6b92
llvm 13 is now not supported (#1612)
tshepang Feb 18, 2023
1efd0ad
bootstrap now creates a usable toolchain when building stage0 std
the8472 Feb 18, 2023
095f27d
new solver: write canonicalization chapter (#1595)
lcnr Feb 20, 2023
110275f
keep "grey area" lint summary green (#1619)
tshepang Feb 21, 2023
ea01bf5
typo (#1617)
tshepang Feb 21, 2023
d01441d
typo (#1616)
tshepang Feb 21, 2023
a7d9603
diagnostics: small fixes/improvements (#1618)
tshepang Feb 21, 2023
9d76913
this remains true (#1620)
tshepang Feb 21, 2023
b06dab8
Fixed typing errors (#1622)
MikaT-code Feb 26, 2023
2d0681e
update error code docs to reflect recent changes (#1625)
Ezrashaw Mar 3, 2023
b684e35
Fixed typing error (#1623)
MikaT-code Mar 3, 2023
62f03c2
Making the sentence more clear (#1624)
MikaT-code Mar 3, 2023
82e50a6
Add detail to contributing guide (#1628)
apiraino Mar 3, 2023
4597bb4
Update explnation about `Body.basic_blocks`
JohnTitor Mar 3, 2023
d1d6ce8
Update date reference about infer context variables
JohnTitor Mar 3, 2023
7e50a6a
Remove mention to lexer/parser refactoring
JohnTitor Mar 3, 2023
ce834a2
improve capacity note (#1634)
tshepang Mar 6, 2023
c1d92ca
Reflect the changes in rust-lang/rust#67000 (#1632)
JohnTitor Mar 6, 2023
8a87736
Fix Rust Analyzer settings location
clubby789 Mar 7, 2023
477309b
tracing log along diff crates
bvanjoi Mar 10, 2023
e7fdb91
improve accuracy
tshepang Mar 10, 2023
f9d24b3
fix typo `SubstRef` to `SubstsRef`
ohno418 Mar 12, 2023
b1b6d69
Rename `config.toml.example` to `config.example.toml`
thomcc Mar 11, 2023
b51fa3c
Update rustdoc-internals.md
notriddle Mar 13, 2023
87afef0
typo
tshepang Mar 14, 2023
77d01ca
fix date-check annotation
tshepang Mar 14, 2023
8307567
fix date-check annotation some more
tshepang Mar 14, 2023
60402a7
alert when date gets stale (by using date-check annotation)
tshepang Mar 14, 2023
7153b94
Fix "Crate disambiguator" in libs-and-metadata.md
Hoblovski Mar 16, 2023
939720e
Add chapter on fuzzing
langston-barrett Mar 16, 2023
435af19
Address review comments
langston-barrett Mar 16, 2023
34d85e1
mir-opt*-level*, not mir-opt
langston-barrett Mar 16, 2023
b17ff13
Address review comments
langston-barrett Mar 16, 2023
a65b9c7
Mention debug assertions
langston-barrett Mar 16, 2023
acfe07c
Mention debug assertions label
langston-barrett Mar 16, 2023
7cef03a
Reword to include 'distractions'
langston-barrett Mar 16, 2023
9bdc399
Add SIP solution for macOS users (#1636)
chenyukang Mar 21, 2023
3b6a1bd
first mention of type, and add a link (#1643)
tshepang Mar 21, 2023
8a94e36
Update labels overview (#1639)
ehuss Mar 21, 2023
5eca473
bootsrapping stages overview list
mightyiam Jan 13, 2023
632f670
rewrite bootstrapping stages
mightyiam Mar 14, 2022
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
9 changes: 9 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
root = true

[src/*]
end_of_line = lf
insert_final_newline = true

[ci/*.sh]
indent_style = space
indent_size = 2
10 changes: 10 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Set the default behavior, in case people don't have core.autocrlf set.
* text=auto eol=lf

# git grep shouldn't match entries in huge minified javascript
*.min.js binary

# Older git versions try to fix line endings on images, this prevents it.
*.png binary
*.jpg binary
*.ico binary
80 changes: 80 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: CI

on:
push:
branches:
- master
pull_request:
schedule:
# Run at 18:00 UTC every day
- cron: '0 18 * * *'

jobs:
ci:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest
env:
MDBOOK_VERSION: 0.4.21
MDBOOK_LINKCHECK_VERSION: 0.7.6
MDBOOK_MERMAID_VERSION: 0.12.6
MDBOOK_TOC_VERSION: 0.11.2
DEPLOY_DIR: book/html
BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
# linkcheck needs the base commit.
fetch-depth: 0

- name: Cache binaries
id: mdbook-cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
key: ${{ runner.os }}-${{ env.MDBOOK_VERSION }}--${{ env.MDBOOK_LINKCHECK_VERSION }}--${{ env.MDBOOK_TOC_VERSION }}--${{ env.MDBOOK_MERMAID_VERSION }}

- name: Cache linkcheck
uses: actions/cache@v3
with:
path: |
~/book/linkcheck
key: ${{ runner.os }}-${{ hashFiles('./book/linkcheck') }}

- name: Check line lengths
if: github.event_name != 'push'
run: |
shopt -s globstar
MAX_LINE_LENGTH=100 bash ci/check_line_lengths.sh src/**/*.md

- name: Install latest nightly Rust toolchain
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
rustup update nightly
rustup override set nightly

- name: Install Dependencies
if: steps.mdbook-cache.outputs.cache-hit != 'true'
run: |
cargo install mdbook --version ${{ env.MDBOOK_VERSION }}
cargo install mdbook-linkcheck --version ${{ env.MDBOOK_LINKCHECK_VERSION }}
cargo install mdbook-toc --version ${{ env.MDBOOK_TOC_VERSION }}
cargo install mdbook-mermaid --version ${{ env.MDBOOK_MERMAID_VERSION }}

- name: Check build
run: mdbook build

- name: Deploy to gh-pages
if: github.event_name == 'push'
run: |
touch "${{ env.DEPLOY_DIR }}/.nojekyll"
cp CNAME "${{ env.DEPLOY_DIR }}"
cd "${{ env.DEPLOY_DIR }}"
rm -rf .git
git init
git config user.name "Deploy from CI"
git config user.email ""
git add .
git commit -m "Deploy ${GITHUB_SHA} to gh-pages"
git push --quiet -f "https://x-token:${{ secrets.GITHUB_TOKEN }}@github.com/${GITHUB_REPOSITORY}" HEAD:gh-pages
48 changes: 48 additions & 0 deletions .github/workflows/date-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Date-Check

on:
schedule:
# Run at noon UTC every 1st of the month
- cron: '00 12 01 * *'

# Allow manually starting the workflow
workflow_dispatch:

jobs:
date-check:
if: github.repository == 'rust-lang/rustc-dev-guide'
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v3

- name: Ensure Rust is up-to-date
run: |
rustup update stable

- name: Run `date-check`
working-directory: ci/date-check
run: |
cargo run -- ../../src/ > ../../date-check-output.txt

- name: Open issue
uses: actions/github-script@v6
with:
script: |
const fs = require('fs');

const rawText = fs.readFileSync('date-check-output.txt', { encoding: 'utf8' });
const title = rawText.split('\n')[0];
if (title != 'empty') {
const body = rawText.split('\n').slice(1).join('\n');
github.rest.issues.create({
owner: context.repo.owner,
repo: context.repo.repo,
title,
body,
});
console.log('Opened issue.');
} else {
console.log('No dates to triage.');
}
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,9 @@
book

# prevent accidental changes
book.toml

ci/date-check/target/

# Generated by check-in.sh
pulls.json
9 changes: 9 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
cff-version: 1.2.0
message: If you use this guide, please cite it using these metadata.
title: Rust Compiler Development Guide (rustc-dev-guide)
abstract: A guide to developing the Rust compiler (rustc)
authors:
- name: "The Rust Project Developers"
date-released: "2018-01-16"
license: "MIT OR Apache-2.0"
repository-code: "https://github.com/rust-lang/rustc-dev-guide"
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rustc-dev-guide.rust-lang.org
37 changes: 1 addition & 36 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,3 @@
# The Rust Code of Conduct

A version of this document [can be found online](https://www.rust-lang.org/conduct.html).

## Conduct

**Contact**: [[email protected]](mailto:[email protected])

* We are committed to providing a friendly, safe and welcoming environment for all, regardless of level of experience, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, nationality, or other similar characteristic.
* On IRC, please avoid using overtly sexual nicknames or other nicknames that might detract from a friendly, safe and welcoming environment for all.
* Please be kind and courteous. There's no need to be mean or rude.
* Respect that people have differences of opinion and that every design or implementation choice carries a trade-off and numerous costs. There is seldom a right answer.
* Please keep unstructured critique to a minimum. If you have solid ideas you want to experiment with, make a fork and see how it works.
* We will exclude you from interaction if you insult, demean or harass anyone. That is not welcome behaviour. We interpret the term "harassment" as including the definition in the <a href="http://citizencodeofconduct.org/">Citizen Code of Conduct</a>; if you have any lack of clarity about what might be included in that concept, please read their definition. In particular, we don't tolerate behavior that excludes people in socially marginalized groups.
* Private harassment is also unacceptable. No matter who you are, if you feel you have been or are being harassed or made uncomfortable by a community member, please contact one of the channel ops or any of the [Rust moderation team](/team.html#Moderation) immediately. Whether you're a regular contributor or a newcomer, we care about making this community a safe place for you and we've got your back.
* Likewise any spamming, trolling, flaming, baiting or other attention-stealing behaviour is not welcome.

## Moderation


These are the policies for upholding our community's standards of conduct. If you feel that a thread needs moderation, please contact the [Rust moderation team](/team.html#Moderation).

1. Remarks that violate the Rust standards of conduct, including hateful, hurtful, oppressive, or exclusionary remarks, are not allowed. (Cursing is allowed, but never targeting another user, and never in a hateful manner.)
2. Remarks that moderators find inappropriate, whether listed in the code of conduct or not, are also not allowed.
3. Moderators will first respond to such remarks with a warning.
4. If the warning is unheeded, the user will be "kicked," i.e., kicked out of the communication channel to cool off.
5. If the user comes back and continues to make trouble, they will be banned, i.e., indefinitely excluded.
6. Moderators may choose at their discretion to un-ban the user if it was a first offense and they offer the offended party a genuine apology.
7. If a moderator bans someone and you think it was unjustified, please take it up with that moderator, or with a different moderator, **in private**. Complaints about bans in-channel are not allowed.
8. Moderators are held to a higher standard than other community members. If a moderator creates an inappropriate situation, they should expect less leeway than others.

In the Rust community we strive to go the extra step to look out for each other. Don't just aim to be technically unimpeachable, try to be your best self. In particular, avoid flirting with offensive or sensitive issues, particularly if they're off-topic; this all too often leads to unnecessary fights, hurt feelings, and damaged trust; worse, it can drive people away from the community entirely.

And if someone takes issue with something you said or did, resist the urge to be defensive. Just stop doing what it was they complained about and apologize. Even if you feel you were misinterpreted or unfairly accused, chances are good there was something you could've communicated better — remember that it's your responsibility to make your fellow Rustaceans comfortable. Everyone wants to get along and we are all here first and foremost because we want to talk about cool technology. You will find that people will be eager to assume good intent and forgive as long as you earn their trust.

The enforcement policies listed above apply to all official Rust venues; including official IRC channels (#rust, #rust-internals, #rust-tools, #rust-libs, #rustc, #rust-beginners, #rust-docs, #rust-community, #rust-lang, and #cargo); GitHub repositories under rust-lang, rust-lang-nursery, and rust-lang-deprecated; and all forums under rust-lang.org (users.rust-lang.org, internals.rust-lang.org). For other projects adopting the Rust Code of Conduct, please contact the maintainers of those projects for enforcement. If you wish to use this code of conduct for your own project, consider explicitly mentioning your moderation policy or making a copy with your own moderation policy so as to avoid confusion.

*Adapted from the [Node.js Policy on Trolling](http://blog.izs.me/post/30036893703/policy-on-trolling) as well as the [Contributor Covenant v1.3.0](http://contributor-covenant.org/version/1/3/0/).*
This repository follows the [Code of Conduct](https://www.rust-lang.org/conduct.html) of the Rust organization.
130 changes: 127 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,127 @@
An attempt to docuemnt how the compiler works. The intention is to
bootstrap this "in repo" and eventually move the text over into the
main rustc repo.
[![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)


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 can read the latest version of the guide here.](https://rustc-dev-guide.rust-lang.org/)

You may also find the rustdocs [for the compiler itself][rustdocs] 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.

[rustdocs]: https://doc.rust-lang.org/nightly/nightly-rustc

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

### Contributing to the guide

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

If you'd like to help improve the guide, we'd love to have you! You can find
plenty of issues on the [issue
tracker](https://github.com/rust-lang/rustc-dev-guide/issues). Just post a
comment on the issue you would like to work on to make sure that we don't
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
rustdocs][rustdocs].

### Build Instructions

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

```
> cargo install mdbook mdbook-linkcheck mdbook-toc mdbook-mermaid
```

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

```
> mdbook build
```

The build files are found in the `book` directory.

### Link Validations

We use `mdbook-linkcheck` to validate URLs included in our documentation.
`linkcheck` will be run automatically when you build with the instructions in the section above.

### Table of Contents

We use `mdbook-toc` to auto-generate TOCs for long sections. You can invoke the preprocessor by
including the `<!-- toc -->` marker at the place where you want the TOC.

### Pre-commit script

We also test that line lengths are less than 100 columns. To test this locally,
you can run `ci/check_line_lengths.sh`.

You can also set this to run automatically.

On Linux:

```bash
ln -s ../../ci/check_line_lengths.sh .git/hooks/pre-commit
```

On Windows:

```powershell
New-Item -Path .git/hooks/pre-commit -ItemType HardLink -Value <absolute_path/to/check_line_lengths.sh>
```

## How to fix toolstate failures

> **NOTE**: Currently, we do not track the rustc-dev-guide toolstate due to
[spurious failures](https://github.com/rust-lang/rust/pull/71731),
but we leave these instructions for when we do it again in the future.

1. You will get a ping from the toolstate commit. e.g. https://github.com/rust-lang-nursery/rust-toolstate/commit/8ffa0e4c30ac9ba8546b7046e5c4ccc2b96ebdd4

2. The commit contains a link to the PR that caused the breakage. e.g. https://github.com/rust-lang/rust/pull/64321

3. If you go to that PR's thread, there is a post from bors with a link to the CI status: https://github.com/rust-lang/rust/pull/64321#issuecomment-529763807

4. Follow the check-actions link to get to the Actions page for that build

5. There will be approximately 1 billion different jobs for the build. They are for different configurations and platforms. The rustc-dev-guide build only runs on the Linux x86_64-gnu-tools job. So click on that job in the list, which is about 60% down in the list.

6. Click the Run build step in the job to get the console log for the step.

7. Click on the log and Ctrl-f to get a search box in the log

8. Search for rustc-dev-guide. This gets you to the place where the links are checked. It is usually ~11K lines into the log.

9. Look at the links in the log near that point in the log

10. Fix those links in the rustc-dev-guide (by making a PR in the rustc-dev-guide repo)

11. Make a PR on the rust-lang/rust repo to update the rustc-dev-guide git submodule in src/docs/rustc-dev-guide.
To make a PR, the following steps are useful.

```bash
# Assuming you already cloned the rust-lang/rust repo and you're in the correct directory
git submodule update --remote src/doc/rustc-dev-guide
git add -u
git commit -m "Update rustc-dev-guide"
# Note that you can use -i, which is short for --incremental, in the following command
./x.py test --incremental src/doc/rustc-dev-guide # This is optional and should succeed anyway
# Open a PR in rust-lang/rust
```

12. Wait for PR to merge

Voilà!
Loading