Rustc Dev Guide WG - Master Document

Tasks

  • Define how would we want to structure the guide
  • Technical debt (lots of potential cleanup, followup work, lots of open issues)
    • mark-i-m: I particularly want to go through open issues and triage them systematically and fix low-hanging fruit. I know this is tedious work, but I feel like we need to do it at some point
  • Write a walkthrough section about what the compiler does to your code
    • It may also be nice to have a concrete example that shows all the compilation phases, artifacts and structures generated along the way.
    • walk through compilation of simple program
    • link to other chapters for details
    • This is more like what the compiler does and how it works high level
    • [@Chris Simpkins] Succinct summary of how to visualize each representation stage of the compile process (e.g., cargo rustc -- -Zunpretty=hir-tree for HIR)
    • Other ideas about walk-through
      • More or less an expansion of the "High-level overview of the compiler source" section)
      • Content (or links to):
        • compiler high level structure
        • system requirements & dependencies
        • compiler module structure
        • crate dependencies
        • compiler configuration
        • compiler inputs
        • compiler outputs
        • compiler state
        • Walk-through of compiling a meaningful example
  • Write a walkthrough about how a full feature is implemented
  • Mermaid add diagrams throughout the guide
  • Collect a set of PRs that help understanding some parts of the compiler
    • Would be nice if we can collect PRs that are interesting to understand certain things
    • Issue created
  • [@spastorino] Schedule a lecture about LLVM with @Alex Crichton
    • Alex can do a lecture with maybe not really up to date content
    • mw can do a Q&A session
    • asked nikic too
  • [@Chris Simpkins] Write a blog post about the Overview chapter effort
    • The idea would be like a call for action, for people to help us shape a good Overview chapter
    • Could be something like we are writing an Overview chapter, here is an idea of what could look like, please give your insights on things you would include
    • Blog post outline / drafts
  • [@mark-i-am] Schedule a lecture about codegen mir -> llvm IR with @nagisa
    • nagisa not available for a lecture, but they gave us some notes, which we turned into a few small chapters on codegen/backend
    • Collecting holes/questions about backend stuff and incrementally filling in holes: doc is here
    • This is ongoing work
  • [@spastorino] Changing name to rustc-dev-guide or rust-compiler-dev-guide (rcdg?) as per https://github.com/rust-lang/rustc-guide/issues/470?
  • [@mark-i-am] Document our sprint like process
  • [@spastorino] Schedule meetings for the next couple of months
  • [@spastorino] Schedule a lecture about monomorphization/type memory layout with @oli
    • @oli doesn't have time ATM for this :(
  • [@spastorino] Schedule a lecture about Parallel with @nikomatsakis, @simulacrum or @Alex Crichton
    • Everyone agreed that would be nice, the working group is a bit on hold for now on the other hand
    • @simulacrum said that he can answer question but can't come up with a general explanation
    • This won't happen for now
  • Write an Overview chapter

Topics to cover

In priority order

  • Monomorphization, Type Memory Layout, Codegen, LLVM
  • Type checking (completing existing ty chapter)
  • Name Resolution
  • Errors/Diagnostics chapter
  • MIR
    • Constants, Promoted Constants in MIR
    • Construction of MIR
    • Borrow Check: Moves and initialization
    • MIR Type check
    • Various parts of NLL
  • Traits
    • Region Constraints
    • SLG solver
  • Macros, hygiene, proc macros, custom derives, etc.
    • We can use petrochenkov's notes from the two meetings we had
    • Perhaps we can do this after Ty?
  • Lexing and Parsing
  • MIR
    • Optimizations
  • Profiling
  • Debugging
Select a repo