i've recently started diving nose deep into the compiler internals, specifically mono ir layouts and stuff
reading the source code has been beneficial, but to understand some of the deeper non obvious abstractions i often need to ask ayaz etc
i haven't seen much published docs on these subjects besides https://github.com/roc-lang/roc/blob/main/crates/compiler/solve/docs/ambient_lambda_set_specialization.md
is there any curated list of past drafts or something somewhere i can look at?
I would LOVE more compiler docs. I really would love to start contributing, but just diving into the code has been pretty overwhelming to someone who has never done compiler work before. Something like this but for Roc would be amazing
I think it would also be valuable to be able to log the output of every "compiler stage". It requires less effort than thorough docs, stays up to date, and I expect it to be great for learning and debugging.
To help understand the compiler Luke also made some awesome diagrams.
I once built an interactive graph visualization for complex machine learning pipelines where you could click things to get more detailed info. I believe that something very similar would work well for the compiler. There's an opportunity here to significantly improve our productivity and onboarding.
I can write some more compiler docs summarizing the whole pipeline and the key bits. I'll have some free time lat this weekend to do so. Will follow up here when it's available to check whether it's helpful or maybe people want more insight.
I started a document here: https://github.com/roc-lang/roc/pull/5130. Please feel free to leave comments on what sections would be useful/would not be, or add to it.
Tangent: me and my Dutch brain: "why is someone thanking Anton for the work Ayaz is doing?"
image.png
Hehe, I get it, I'm from Belgium btw
lol
Thank you @Ayaz Hafiz, I found this helpful. I like this style/format.
There's a nice write up of the Austral compiler at: https://borretti.me/article/design-austral-compiler
Last updated: Jul 05 2025 at 12:14 UTC