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

[Draft] Rework the "Overview of the Compiler" chapter #1955

Closed
wants to merge 6 commits into from

Conversation

jieyouxu
Copy link
Member

@jieyouxu jieyouxu commented Apr 1, 2024

Context: #674

Reworking the "Overview of the Compiler" chapter

I've noticed that the current Overview chapter seems to have several issues that make it difficult for new contributors to understand the compiler's structure and architecture at a high-level:

  • Mixed detail levels.
  • Some areas are very briefly mentioned or omitted.
  • Still very hard to actually get a reasonably full high-level picture of the compiler.

See also discussion during a rustc-dev-guide reading club session (cf. https://rust-lang.zulipchat.com/#narrow/stream/196385-t-compiler.2Fwg-rustc-dev-guide/topic/.5Breading.20club.5D.202023.2E02.2E26.20chapters.2022.20to.2030/near/423423778).

This PR aims to rework the Overview of the Compiler chapter to make it more friendly for new contributors and be more comprehensive and to address some of these shortcomings.

The R0 draft here is intentionally incomplete: I worked on this draft in a separate HackMD document, but it's at a point where it has sufficient content to allow people to start giving feedback, suggestions and contributions (and I also want to start fixing the links and reworking diagrams so they can be embedded in a mdBook-compatible fashion).

Some inline remarks (presented as quote blocks) are left in during draft phase, will be removed when ready.

Rendered text

Revision History

Revision history is maintained through individual commits, so they are not repeated here.

Comment on lines 377 to 379
> 🚧 **TODO** 🚧 (Remove the cat meme when complete with draft)

![](https://hackmd.io/_uploads/ry2CM6gAa.jpg)
Copy link
Member

@Nadrieril Nadrieril Apr 1, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🤣 plz don't remove the cat meme

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

something something retaining the cat meme might require an FCP in the final version /jk

> trait system here?** AFAIK, it's both dependent and and provides information
> to multiple areas. Link: <https://github.com/rust-lang/rust/pull/121848>

#### Static-Single Assignment (SSA) Code Generation
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're missing a section about codegen. Idk if it's querified or not

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't talk about codegen Yeah I'm not completely sure about codegen atm.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Stubbed out a section on the 3 codegen backends

src/overview/overview.md Outdated Show resolved Hide resolved
src/overview/overview.md Outdated Show resolved Hide resolved
jieyouxu added 3 commits April 8, 2024 14:48
- Transfer everything from HackMD into a PR.
- Change querified area summary order to correspond to "normal"
  code->codegen direction.
- Add SVGs generated based on the graphviz sources.
- Remove some editorial remarks.
jieyouxu added 3 commits April 8, 2024 15:05
…en backends

- Extend HIR wfcheck to cover not only type wfcheck, but other HIR
  wfchecks like object safety.
- Stub out rustc driver/interface as the high-level entry point and
  orchestrator of the compilation process.
- Stub out codegen backends.
@Noratrieb
Copy link
Member

@jieyouxu meow (do you plan to continue working on this at some point)

@jieyouxu
Copy link
Member Author

@jieyouxu meow (do you plan to continue working on this at some point)

yes meow

@jieyouxu jieyouxu added the S-waiting-on-author Status: this PR is waiting for additional action by the OP label Oct 13, 2024
@jieyouxu
Copy link
Member Author

jieyouxu commented Nov 2, 2024

I'm closing this PR because I think I have a better idea for how to organize the overview and I didn't really vibe with this organization (of information dependency flow, I still find it confusing myself). I want to talk about it in the reading club and w/ t-compiler ppl ~next week. (And it's easier to start from a fresh plate.)

@jieyouxu jieyouxu closed this Nov 2, 2024
@jieyouxu jieyouxu deleted the overview-rework branch November 2, 2024 19:23
@jieyouxu jieyouxu removed the S-waiting-on-author Status: this PR is waiting for additional action by the OP label Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants