Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. nom

nom

MITRust

A Rust parser combinator framework for building fast, safe, and memory-efficient parsers for binary and text formats.

GitHubGitHub
10.5k stars850 forks0 contributors

What is nom?

nom is a parser combinator framework written in Rust that provides tools for building fast, safe, and memory-efficient parsers. It allows developers to create parsers for binary formats, text formats, programming languages, and streaming data by combining small, reusable parsing functions. The framework leverages Rust's type system and memory safety to prevent common vulnerabilities like buffer overflows while maintaining high performance.

Target Audience

Rust developers who need to parse binary protocols, text formats, configuration files, or programming languages, especially those prioritizing safety, performance, and zero-copy operations.

Value Proposition

Developers choose nom for its unique blend of safety, speed, and composability—offering zero-copy parsing, streaming support, and descriptive errors without sacrificing performance, making it ideal for both binary and text parsing tasks.

Overview

Rust parser combinator framework

Use Cases

Best For

  • Parsing binary network protocols like HTTP, TLS, or custom binary formats
  • Building text format parsers for CSV, JSON, TOML, or INI files
  • Creating programming language parsers or prototyping new languages
  • Handling streaming data where partial input is common
  • Developing parsers that require bit-level precision
  • Writing safe parsers for security-critical applications

Not Ideal For

  • Projects requiring simple, one-off text parsing where regular expressions are more straightforward and less verbose
  • Teams that prefer declarative grammar tools like ANTLR or Yacc over combinator-based approaches for language parsing
  • Applications needing immediate, out-of-the-box parsers for common formats without custom implementation effort
  • Polyglot projects where parsing must be integrated across multiple programming languages outside Rust

Pros & Cons

Pros

Zero-Copy Efficiency

Returns slices of input data without copying, minimizing memory overhead for binary and text formats, as highlighted in the README's technical features.

Streaming Support

Handles partial data gracefully, making it suitable for network protocols and large files where data arrives in chunks, ensuring deterministic parsing.

High Performance

Benchmarks show it often outperforms other parser combinator libraries, regex engines, and even handwritten C parsers, prioritizing speed without sacrificing safety.

Safe Parsing Guarantees

Leverages Rust's memory safety and type system; fuzzing has found no flaws in nom itself, reducing vulnerabilities like buffer overflows.

Cons

Steep Learning Curve

The combinator approach requires understanding functional programming patterns and Rust's complex type system, which can be daunting for newcomers.

Complex Error Configuration

While descriptive errors are possible, setting up custom error types and aggregating errors involves additional boilerplate and complexity, as admitted in the documentation.

Rust-Only Ecosystem

Confined to Rust, limiting its use in projects that rely on multiple languages or require cross-platform parsing libraries.

Frequently Asked Questions

Quick Stats

Stars10,481
Forks850
Contributors0
Open Issues242
Last commit1 year ago
CreatedSince 2014

Tags

#parse#nom#binary-parsing#zero-copy#rust-library#grammar#parser-combinators#rust#no-std#text-parsing#parser#performance

Built With

R
Rust

Included in

Rust56.6k
Auto-fetched 1 day ago

Related Projects

tree-sittertree-sitter

An incremental parsing system for programming tools

Stars27,253
Forks2,988
Last commit2 days ago
pestpest

The Elegant Parser

Stars5,408
Forks314
Last commit7 days ago
lalrpoplalrpop

LR(1) parser generator for Rust

Stars3,503
Forks313
Last commit4 days ago
rust-pegrust-peg

Parsing Expression Grammar (PEG) parser generator for Rust

Stars1,604
Forks118
Last commit5 months ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub