Can i use rust to write my compiler??

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

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

    A list of programming languages implemented in Rust, for inspiration.

  • Absolutely. For a non-exhaustive list of other languages written in Rust, there is https://github.com/alilleybrinker/langs-in-rust. If you are looking for libraries to help you along the way, check out https://github.com/Kixiron/rust-langdev.

  • starlark-rust

    A Rust implementation of the Starlark language

  • As mentioned in other comments, type system features like algebraic data types (that Rust has) are really helpful. If you want a small-but-real example of a compiler in Rust (with an optimizer etc) then the starlark-rust compiler is good.

  • 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
  • rust-langdev

    Language development libraries for Rust

  • Absolutely. For a non-exhaustive list of other languages written in Rust, there is https://github.com/alilleybrinker/langs-in-rust. If you are looking for libraries to help you along the way, check out https://github.com/Kixiron/rust-langdev.

  • plzoo

    Programming Languages Zoo

  • Such as OCaml. Incidentally, the first versions of Rust itself were written in OCaml. You can also find a ton of examples in this domain.

  • pratt

    Pratt parser written in Rust

  • The best parsing (for hand coding) https://github.com/segeljakt/pratt

  • codespan

    Beautiful diagnostic reporting for text-based programming languages.

  • Nice error messages (for YOUR lang) https://github.com/brendanzab/codespan or https://docs.rs/ariadne/0.1.3/ariadne/

  • inkwell

    It's a New Kind of Wrapper for Exposing LLVM (Safely)

  • There are also libs that can be used for some tasks like parsing https://lib.rs/parsing and code generation like cranelift https://docs.rs/cranelift/0.76.0/cranelift/ and llvm https://github.com/TheDan64/inkwell

  • 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
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