What is the state of the art for creating domain-specific languages (DSLs) with Rust?

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

Stream - Scalable APIs for Chat, Feeds, Moderation, & Video.
Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
getstream.io
featured
InfluxDB – Built for High-Performance Time Series Workloads
InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
www.influxdata.com
featured
  1. pest

    The Elegant Parser (by pest-parser)

    I second pest.rs. Using it is fairly intuitive and there's also a live playground on their website which is great for quickly developing and testing your AST (abstract syntax tree) parser for whatever language you're implementing.

  2. Stream

    Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.

    Stream logo
  3. egg

    egg is a flexible, high-performance e-graph library (by egraphs-good)

    For semantic analyzers, check out egg and egglog. They're custom data structures for representing compiler rewrite rules in a non-destructive way.

  4. egglog

    egraphs + datalog!

    For semantic analyzers, check out egg and egglog. They're custom data structures for representing compiler rewrite rules in a non-destructive way.

  5. nom

    Rust parser combinator framework

    As much as I love nom as well as other parser combinator libraries, regex-based parsers, BNF/EBNF-based parsers, etc. I always end up going back to plain old text-based char-by-char scanners.

  6. lalrpop

    LR(1) parser generator for Rust

    lalrpop

  7. hyperscript

    Create HyperText with JavaScript.

    In fairness, there's a lot of overlap between embedded DSLs and libraries — a library like Hyperscript for generating HTML in JavaScript is in many ways a DSL, but it's also just a bunch of functions that are easy to put together in a particular way. But this is often good enough!

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

  • Lelwel: A resilient LL(1) parser generator for Rust

    1 project | news.ycombinator.com | 12 Jul 2024
  • Letlang — Roadblocks and how to overcome them - My programming language targeting Rust

    6 projects | /r/rust | 7 Jun 2023
  • Contrext-free language parsing with procedural macros

    2 projects | /r/rust | 25 Jan 2023
  • Show HN: IQ” – jq for images (using rust, LALRPOP)

    2 projects | news.ycombinator.com | 18 Sep 2022
  • Analogues of nom crate.

    3 projects | /r/rust | 7 Feb 2022

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