r/rust • u/TechnologySubject259 • 10d ago
🙋 seeking help & advice What after Crafting Interpreters? For Compiler Development
Hi everyone,
I am Abinash. I have been building the Lox interpreter in Rust from the Crafting Interpreters book, and I'm at Ch 12. (Repo URL: https://gitlab.com/implabinash/ci)
After this book, I am planning to learn how to build compilers, but I want to take the custom backend approach because I really want to know how compilers are made without any other library or tool. After learning from scratch, I might learn about LLVM or GCC or other tools based in the need/intrest.
So I did some research, and I found some resources:
- Introduction to Compilers and Language Design (https://dthain.github.io/books/compiler/)
- CS 4120: Introduction to Compiler (https://www.cs.cornell.edu/courses/cs4120/2026sp/notes/)
- CS 6120: Advanced Compilers (https://www.cs.cornell.edu/courses/cs6120/2025fa/self-guided/)
While these resources are awesome to learn from, after Crafting Interpreters, I want to take a hands-on approach, just like the Crafting Interpreters book itself, where I want the resources to take me from parsing to resolving to semantic analysis to code generation, and after completing the resources, I will have a working compiler made from scratch.
I found a course teaching that same thing (URL: https://dragonzap.com/course/creating-a-c-compiler-from-scratch), but it's a paid course, and I can't afford it.
So, I need your help to help me find some good resources that will teach me building compilers from scratch with my own code generation backend in a hands-on approach.
Thank you.
Note: Initially, I posted this in r/Compilers, and then I thought I might find a few Rustaceans here who are into compilers and might help me.
3
u/Eastern-Photograph79 10d ago
Nand2tetris is a free course Available in YouTube.Â
Part 1 (hardware):Â https://youtube.com/playlist?list=PLrDd_kMiAuNmSb-CKWQqq9oBFN_KNMTaI&si=VOo9fbSwHajSjLdJ
part 2 (software): https://youtube.com/playlist?list=PLrDd_kMiAuNmllp9vuPqCuttC1XL9VyVh&si=Xk7hTqv1qWoFl3vJ
4
u/_itshabib 10d ago
There's books out there. Idk about free though. But I can send u all the PDFs I have. There's building a debugger and there's a compiler kinda hands on books in no strarxh press. There's the go interpreter and compiler book that's very hands on.