"So you want to hack on the Rust compiler?", a plan for a book


I’d prefer to shoot for the curated approach, at least to start. I don’t think opening a PR is such a burden.

My long-term goal is that this doc has checked links and so forth, and moves into the repo, such that when people make edits to the compiler that would invalidate it, it is expected that part of the PR is to update the guide.

This may be unrealistic, but it’s worth a shot.

As a side benefit, it’s much easier to read a “big refactoring” PR when you have an overview of what the author is trying to accomplish.


Just want to say that the rustc-guide page is now rendering automatically after ever PR and starting to get some commits! Take a look, I think just glancing over the TOC already gives you a feeling for the potential here.


@mark-i-m you make a good point. This book will definitely be more helpful if it is well structured. And actually, after thinking about it more, I’m pretty sure that having an issue tracker, and being able to review pull requests and suggest edits, will make the book way better (and more up-to-date) than it would be if it was just a simple wiki.

You can consider my concerns addressed.

I just took a look at the book. Even with just a few pages filled out, it’s already super helpful, and I can’t wait to read up on the other stuff once it gets added. I think this seriously lowers the barrier to entry to compiler-hacking.


This link can become more visible if you’d put it on top of the starter post, like with UPD: started work on rustc guide book .


@nikomatsakis Is there a milestone you were thinking of for when to move the book into the rust repo (if that is the plan)? For example, would it be after closing https://github.com/rust-lang-nursery/rustc-guide/issues/6 or reaching “feature” parity with the existing documentation?


I didn’t really have a milestone in mind. I’m also not entirely sure that we should move the book into the repo – although having the ability to have links between source and docs feels pretty nice.


Just a status update:

We currently are missing a few critical chapters:

  • “walkthrough of a typical contribution”
  • Type checking
  • MIR
  • trans/LLVM

Additionally, there are a bunch of chapters that could be cleaned up or improved: https://github.com/rust-lang-nursery/rustc-guide/issues?q=is%3Aissue+is%3Aopen+label%3A"help+wanted"

Finally, there are a bunch of PRs that I am simply not technically knowledgable enough to review in a satisfactory way: https://github.com/rust-lang-nursery/rustc-guide/pulls?q=is%3Apr+is%3Aopen+label%3Awaiting-on-review

Any help would be appreciated!


BTW, kudos to you @mark-i-m for all your work on the guide. I’ve been trying to put in an hour here or there but it’s been hard to make time. I’ll take a look at your traits work, and I’ve been hoping to write up more about type-checking and specifically NLL / borrow-checking as well.



I’d like to volunteer for proof reading, if you need proof readers :slight_smile:


Just realised how old this thread is!


Proof reading would be absolutely welcome!

You can find the repo here: https://github.com/rust-lang/rustc-guide

And the rendered version of that repo is here: https://rust-lang.github.io/rustc-guide/

Please feel free to make a PR!