rustc-dev-guide

A guide to how rustc works and how to contribute to it.

https://github.com/rust-lang/rustc-dev-guide

Science Score: 54.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    8 of 427 committers (1.9%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.2%) to scientific vocabulary

Keywords

compiler contributing rust rustc

Keywords from Contributors

argument-parser command-line-parser parsed-arguments positional-arguments subcommands search-engine systemd system services init
Last synced: 6 months ago · JSON representation ·

Repository

A guide to how rustc works and how to contribute to it.

Basic Info
Statistics
  • Stars: 1,774
  • Watchers: 38
  • Forks: 554
  • Open Issues: 176
  • Releases: 0
Topics
compiler contributing rust rustc
Created about 8 years ago · Last pushed 6 months ago
Metadata Files
Readme License Code of conduct Citation

README.md

CI

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.

You may also find the rustdocs for the compiler itself 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 documentation on developing the standard library, see std-dev-guide.

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. 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.

Build Instructions

To build a local static HTML site, install mdbook with:

cargo install mdbook mdbook-linkcheck2 mdbook-mermaid

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

mdbook build --open

The build files are found in the book/html directory.

Link Validations

We use mdbook-linkcheck2 to validate URLs included in our documentation. Link checking is not run by default locally, though it is in CI. To enable it locally, set the environment variable ENABLE_LINKCHECK=1 like in the following example.

ENABLE_LINKCHECK=1 mdbook serve

Table of Contents

Each page has a TOC that is automatically generated by pagetoc.js. There is an associated pagetoc.css, for styling.

Synchronizing josh subtree with rustc

This repository is linked to rust-lang/rust as a josh subtree. You can use the rustc-josh-sync tool to perform synchronization.

You can find a guide on how to perform the synchronization here.

Owner

  • Name: The Rust Programming Language
  • Login: rust-lang
  • Kind: organization
  • Email: contact@rust-lang.org
  • Location: United States of America

Citation (CITATION.cff)

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"

GitHub Events

Total
  • Issues event: 89
  • Watch event: 111
  • Delete event: 108
  • Issue comment event: 491
  • Push event: 673
  • Pull request review comment event: 290
  • Pull request review event: 411
  • Pull request event: 747
  • Fork event: 50
  • Create event: 115
Last Year
  • Issues event: 89
  • Watch event: 111
  • Delete event: 108
  • Issue comment event: 491
  • Push event: 673
  • Pull request review comment event: 290
  • Pull request review event: 411
  • Pull request event: 747
  • Fork event: 50
  • Create event: 115

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 2,816
  • Total Committers: 427
  • Avg Commits per committer: 6.595
  • Development Distribution Score (DDS): 0.858
Past Year
  • Commits: 521
  • Committers: 113
  • Avg Commits per committer: 4.611
  • Development Distribution Score (DDS): 0.843
Top Committers
Name Email Commits
Mark Mansi m****m@c****u 401
Tshepang Mbambo t****g@g****m 269
Niko Matsakis n****o@a****u 139
Jynn Nelson g****b@j****v 126
Yuki Okushi h****v@g****m 119
Camelid c****l@g****m 94
Eric Huss e****c@h****g 68
许杰友 Jieyou Xu (Joe) 3****u 61
Santiago Pastorino s****o@g****m 59
Jakub Beránek b****k@g****m 56
lcnr r****t@l****e 48
LeSeulArtichaut l****t@g****m 37
Oliver Scherer g****1@o****e 37
İsmail Arılık a****l@g****m 29
Alexander Regueiro a****g@m****m 27
Tyler Mandry t****y@g****m 25
Boxy s****r@g****m 24
Martin Liska m****a@h****m 23
Tbkhi d****n@i****m 23
Ralf Jung p****t@r****e 22
Chris Simpkins g****s@g****m 21
Stuart Cook Z****r 21
Michael Bryan m****n@g****m 19
Stan Manilov s****v@g****m 18
varkor g****b@v****m 17
Rajkumar Natarajan r****n@s****m 16
onur-ozkan w****k@o****v 14
Takayuki Nakata f****7@g****m 14
Michael Goulet m****l@e****o 14
Nicholas Nethercote n****e@g****m 13
and 397 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 148
  • Total pull requests: 1,008
  • Average time to close issues: about 1 year
  • Average time to close pull requests: 19 days
  • Total issue authors: 52
  • Total pull request authors: 153
  • Average comments per issue: 1.82
  • Average comments per pull request: 0.7
  • Merged pull requests: 821
  • Bot issues: 21
  • Bot pull requests: 52
Past Year
  • Issues: 51
  • Pull requests: 688
  • Average time to close issues: 14 days
  • Average time to close pull requests: 3 days
  • Issue authors: 18
  • Pull request authors: 96
  • Average comments per issue: 0.55
  • Average comments per pull request: 0.62
  • Merged pull requests: 549
  • Bot issues: 11
  • Bot pull requests: 52
Top Authors
Issue Authors
  • github-actions[bot] (21)
  • spastorino (21)
  • jieyouxu (19)
  • nikomatsakis (7)
  • Arthur-Milchior (7)
  • lolbinarycat (6)
  • pnkfelix (4)
  • mark-i-m (4)
  • marxin (4)
  • RalfJung (3)
  • camelid (3)
  • JohnTitor (3)
  • jyn514 (3)
  • dev-ardi (2)
  • clubby789 (2)
Pull Request Authors
  • tshepang (149)
  • jieyouxu (102)
  • Kobzol (62)
  • github-actions[bot] (48)
  • Tbkhi (44)
  • marxin (42)
  • smanilov (34)
  • lcnr (23)
  • Zalathar (22)
  • fmease (22)
  • ehuss (20)
  • BoxyUwU (20)
  • Arthur-Milchior (16)
  • lolbinarycat (12)
  • onur-ozkan (12)
Top Labels
Issue Labels
T-compiler (45) C-enhancement (43) E-help-wanted (35) E-medium (20) E-hard (17) T-types (9) WG-rustc-dev-guide (7) E-easy (7) A-contributor-onboarding (7) needs-triage (7) T-bootstrap (6) A-meta (6) A-contribution-workflows (6) C-cleanup (5) C-discussion (4) A-HIR (4) T-rustdoc (4) A-test-suite (4) C-tracking-issue (4) A-closures (4) A-async (3) WG-async (3) T-infra (3) A-AST (3) C-date-reference-triage (3) A-devex (3) A-debuggers (3) T-rust-analyzer (3) F-reading-club (2) A-compiletest (2)
Pull Request Labels
S-waiting-on-review (139) T-compiler (56) WG-rustc-dev-guide (37) T-bootstrap (32) S-waiting-on-author (27) A-compiletest (27) A-test-suite (26) A-linkcheck (18) A-CI (14) T-types (11) waiting-on-author (9) C-CI (8) A-josh (7) T-rustdoc (7) S-blocked (6) C-cleanup (6) waiting-on-review (5) T-infra (5) A-git (5) A-contributor-onboarding (5) A-meta (5) A-diagnostics (5) A-stability (5) A-custom-driver (4) A-incr-comp (4) T-lang (3) A-driver (3) blocked (3) A-borrow-checker (3) T-libs (3)