How to write a compiler or interpreter in rust

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

CodeRabbit: AI Code Reviews for Developers
Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.
coderabbit.ai
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • rust-langdev

    Language development libraries for Rust

  • CodeRabbit

    CodeRabbit: AI Code Reviews for Developers. Revolutionize your code reviews with AI. CodeRabbit offers PR summaries, code walkthroughs, 1-click suggestions, and AST-based analysis. Boost productivity and code quality across all major languages with each PR.

    CodeRabbit logo
  • nom

    Rust parser combinator framework

    Parsing framework: https://github.com/Geal/nom

  • 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 https://tablam.org:

  • 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

    Oga is an XML/HTML parser written in Ruby.

    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 https://github.com/bytecodealliance/cranelift-jit-demo as well as the messages on the Zulip chat if you get stuck)

  • SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
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

  • Why I love Rust for tokenising and parsing

    12 projects | news.ycombinator.com | 7 Nov 2024
  • Rust clean-slate POSIX CLI utilities 0.2.1 release: Awk, M4, ftw and more

    3 projects | news.ycombinator.com | 21 Sep 2024
  • Challenge accepted: announcing SurrealDB 2.0

    2 projects | dev.to | 17 Sep 2024
  • Lelwel: A resilient LL(1) parser generator for Rust

    1 project | news.ycombinator.com | 12 Jul 2024
  • A simple JSON parser using pari

    1 project | news.ycombinator.com | 29 Jun 2024

Did you konow that Rust is
the 5th most popular programming language
based on number of metions?