loxcraft: a compiler, language server, and online playground for the Lox programming language

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

Our great sponsors
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • SaaSHub - Software Alternatives and Reviews
  • Wren

    The Wren Programming Language. Wren is a small, fast, class-based concurrent scripting language.

  • Bob Nystrom also has a blog, and his articles are really well written (see his post on Pratt parsers / garbage collectors). I'd also recommend going through the source code for Wren, it shares a lot of code with Lox. Despite the deceptive simplicity of the implementation, it (like Lox) is incredibly fast - it's a great way to learn how to build production grade compilers in general.

  • loxcraft

    Language tooling for the Lox programming language.

  • WorkOS

    The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.

    WorkOS logo
  • Crafting Interpreters

    Repository for the book "Crafting Interpreters"

  • Better open an issue/request wiki edit at https://github.com/munificent/craftinginterpreters/wiki/Lox-implementations

  • too-many-lists

    Learn Rust by writing Entirely Too Many linked lists

  • Learning Rust with Entirely Too Many Linked Lists is a quick tutorial on unsafe Rust, which you'll need if you're building a garbage collector yourself.

  • lalrpop

    LR(1) parser generator for Rust

  • rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.

  • rowan

  • Make a Language by Luna Razzaghipour is a fantastic series. I especially like that she uses Rowan for building her syntax tree. While this makes your compilation step harder, you get to see how rust-analyzer does syntax trees, which I think is great.

  • rust-langdev

    Language development libraries for Rust

  • rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • mark-sweep

    A simple mark-sweep garbage collector in C

  • Bob Nystrom also has a blog, and his articles are really well written (see his post on Pratt parsers / garbage collectors). I'd also recommend going through the source code for Wren, it shares a lot of code with Lox. Despite the deceptive simplicity of the implementation, it (like Lox) is incredibly fast - it's a great way to learn how to build production grade compilers in general.

  • logos

    Create ridiculously fast Lexers (by maciejhirsz)

  • rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.

  • chumsky

    Write expressive, high-performance parsers with ease.

  • rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.

  • rust-gc

    Simple tracing (mark and sweep) garbage collector for Rust

  • rust-langdev has a lot of libraries for building compilers in Rust. Perhaps you could use these to make your implementation easier, and revisit it later if you want to build things from scratch. I'd suggest logos for lexing, LALRPOP / chumsky for parsing, and rust-gc for garbage collection.

  • starlark-rust

    A Rust implementation of the Starlark language

  • Aside from these, if you want some inspiration for a production-grade language built in Rust, you might want to go through the source code of Starlark and Gluon.

  • gluon

    A static, type inferred and embeddable language written in Rust. (by gluon-lang)

  • Aside from these, if you want some inspiration for a production-grade language built in Rust, you might want to go through the source code of Starlark and Gluon.

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