Build a parser for a custom programming language or configuration format using composable Rust building blocks
Write a parser with good error recovery so users see helpful messages instead of a single cryptic failure line
Parse recursive or nested structures like function calls and arithmetic expressions with type-safe grammar rules
Follow the included tutorial to build a small working interpreter from scratch using real examples
Requires familiarity with Rust's type system, the combinator pattern has a learning curve for developers new to Rust.
Chumsky is a library for the Rust programming language that helps developers write parsers. A parser is a piece of software that reads structured text or data and turns it into something a program can work with. For example, a parser might read a line of code and figure out what operation it describes, or it might read a configuration file and extract settings from it. Chumsky is aimed at developers who need to build this kind of text processing for things like programming languages, config formats, binary protocols, or any other structured input. The library uses a style called parser combinators, which means you build complex parsing logic by combining smaller, simpler pieces. Think of it like Lego blocks: each block does one small job (match a digit, match a keyword, match something in brackets), and you snap them together to describe bigger structures. Rust's type system checks that these pieces fit together correctly as you write the code, catching many mistakes before the program ever runs. Chumsky emphasizes good error messages. When parsing fails, the library includes built-in strategies to recover from errors and continue, rather than stopping at the first problem. This is particularly valuable when building tools for other developers, where a cryptic single-line error message is frustrating but a clear explanation of what went wrong is genuinely helpful. Other features include support for grammars where rules refer back to themselves (recursive structures), an optional memoization mode for performance on certain input types, zero-copy output so the library avoids unnecessary memory allocation, and a compatibility mode for environments without the standard library, such as embedded hardware. The project has moved its primary home to Codeberg, though this GitHub repository remains. Documentation includes a detailed guide, examples for parsing JSON and Brainfuck, and a tutorial that walks through building a small interpreter from scratch. It is available as a published crate on crates.io under an open-source license.
← zesterer on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.