Are there any good books/tutorials on implementing compiler or interpreter or VM in Rust ?
I do not care about the language being implemented. The primary focus is seeing how it is done in Rust.
EDIT: Vec<u8> -> AST is a solved problem. It is not the parsing part that interests me. It is the AST -> ... part that I am interested in.
2e71828
September 13, 2020, 9:48pm
2
The dragon book is language-agnostic, and is still an excellent resource. You can often find the older editions relatively cheap, and most of the techniques haven’t changed that much:
Compilers: Principles, Techniques, and Tools is a computer science textbook by Alfred V. Aho, Monica S. Lam, Ravi Sethi, and Jeffrey D. Ullman about compiler construction for programming languages. First published in 1986, it is widely regarded as the classic definitive compiler technology text.
It is known as the Dragon Book to generations of computer scientists as its cover depicts a knight and a dragon in battle, a metaphor for conquering complexity. This name can also refer to Aho and Ullman...
zicklag
September 14, 2020, 2:20pm
3
Here's a guide to using Cranelift to create small Just-in-Time ( JIT ) compiled language:
https://github.com/bytecodealliance/simplejit-demo