Book to learn about compilers?



it might be a bit out of topic, I would like to contribute to the development of rust itself, and I’m wondering if people in the community has good books regarding the way of working of a compiler.

Is " Compilers: Principles, Techniques, and Tools (2nd Edition)" enough, or should I look for other books/tutorials?

Many thanks,



I recommend Engineering a Compiler(EAC for short). In my opinion, it has better balance of frontend and backend compared to Dragon Book, which is frontend-biased.

EAC 1st edition came out in 2003 and 2nd edition in 2011. Supposedly 3rd edition is in the work. 2nd edition is better and more up-to-date, but 1st edition is okay, it’s not too outdated.

1 Like

Not sure of your level of experience - if you’re starting totally from scratch (like me!), I’d definitely recommend Crafting Interpreters, since it’s both free and very low on jargon.

It focuses more on interpreted languages rather than native compiled languages, but the second half of the book (which is still a work in progress) is about compiling to bytecode for a VM - a lot of the concepts there should be transferable.


If you want to know specifically how rustc works and how to contribute to it, you should read The Rustc Guide, which is the official resource.

1 Like

Personally I like PLP ( as a general reference.

The #langdev channel on the community discord has some additional resources in a pinned comment.

1 Like

I would also add Crafting Interpreters and Build Your own Lisp for people who like to project-based learning.

1 Like