How to write a compiler or interpreter in rust

This page summarizes the projects mentioned and recommended in the original post on

Our great sponsors
  • Scout APM - Truly a developer’s best friend
  • - Download’s Tech Salary Report
  • SonarLint - Clean code begins in your IDE with SonarLint
  • rust-langdev

    Language development libraries for Rust

  • nom

    Rust parser combinator framework

    Parsing framework:

  • Scout APM

    Truly a developer’s best friend. Scout APM is great for developers who want to find and fix performance issues in their applications. With Scout, we'll take care of the bugs so you can focus on building great things 🚀.

  • marwood

    An embeddable Scheme R7 Compiler & Runtime written in Rust

    The lexer can be found here and parser here.

  • TablaM

    The practical relational programing language for data-oriented applications

    Exist some non-obvious things about interpreter implementation with Rust, so i share my opinions while building

  • inko

    You can use Inko as a reference, as its VM is written in Rust. I do recommend using this branch instead of the latest release, as there are a lot of upcoming changes to the language as a whole.

  • Oga

    Read-only mirror of

    In terms of parsing style I suggest sticking with a hand-written recursive-descent parser. Parser generators seem appealing at first, but I always ran into annoying limitations when using them (I wrote one in Ruby myself as well, and used this for this project). Parsing combinators are useful for small inputs, but I find them difficult to use for anything but simple cases.

  • cranelift-jit-demo

    JIT compiler and runtime for a toy language, using Cranelift

    Backend IRs for code generation: - Cranelift (see as well as the messages on the Zulip chat if you get stuck)


    Download’s Tech Salary Report. Median salaries, most in-demand technologies, state of the remote work... all you need to know your worth on the market by tech recruitment platform

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts