nom

A byte-oriented, zero-copy parser combinators library for Rust

Library
Cargo
v8.0.0
10,453stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
42/100Fair
Development Activity0
Maintenance0
Community68
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
81/100Excellent
Architecture88
Code Quality90
Innovation85
Learning Curve60

nom is a parser combinators library for Rust: instead of writing a grammar in a separate file and generating parser code from it (as with lex/yacc-style tools), you compose small, specific parsing functions — “take 5 bytes”, “recognize the word HTTP” — into larger parsers that mirror the shape of the grammar you’re implementing. It works over byte slices, bit streams, and UTF-8 strings with the same combinator style, and returns zero-copy slices of the input wherever possible rather than allocating new buffers.

nom was designed from the start to handle both binary and text formats correctly under streaming/partial-data conditions: when there isn’t enough input to decide an outcome, it reports that more data is needed instead of silently producing a wrong result. It ships descriptive, pattern-matchable error types (with support for custom error types), and has been used in production to write parsers for formats ranging from TLV binary protocols and HTTP to full toy programming languages.

What You Get

  • A library of composable parser combinators (bytes, character, number, sequence, branch, multi, combinator modules) for building larger parsers from small functions
  • Byte-, bit-, and string-oriented parsing using the same combinator API, with zero-copy slice returns
  • Streaming support: parsers correctly report “need more data” instead of guessing when input is incomplete
  • Descriptive, pattern-matchable error types with support for custom error types
  • no_std compatibility via optional alloc/std feature flags for embedded or allocation-constrained targets

Common Use Cases

  • Writing a binary format parser (TLV structures, bit-level protocol fields, custom file formats)
  • Building a text format parser for line-based or nested formats like CSV, INI, or JSON
  • Prototyping a small programming-language parser (lexing, tokenizing, and building an AST in one pass)
  • Writing a streaming network protocol parser that must handle partial reads correctly (e.g. an HTTP proxy)
  • Replacing a hand-written or regex-heavy parser with a safer, memory-safe combinator-based one

Under The Hood

Architecture - The crate is organized by parsing domain: src/bytes (byte-slice combinators), src/bits (bit-level parsing), src/character and src/str.rs (string/UTF-8 parsing), src/number (numeric parsing), plus cross-cutting src/combinator, src/branch, src/sequence, and src/multi modules for composing and sequencing parsers. src/internal.rs defines the core IResult/error machinery all combinators share, and a companion nom-language crate in the same repo builds higher-level language-parsing helpers on top of the core crate.

Tech Stack - 100% Rust, MSRV 1.65+, with an alloc/std feature-flag split so the crate can run in no_std environments when only alloc is available. No required external dependencies for the core combinator engine.

Code Quality - The tests/ directory contains format-specific integration tests (ini.rs, css.rs, arithmetic.rs, json via arithmetic_ast.rs-style AST tests, float.rs, escaped.rs) exercising real parsing scenarios end-to-end, and a proptest-regressions/ directory shows the project uses property-based testing/fuzzing to catch parser edge cases — the README states fuzzing has only ever found flaws in code outside nom itself.

API Design - The combinator style (small functions like tag, take_while_m_n, map_res composed via .parse()) keeps individual parsers both reusable and independently testable, and the resulting code reads close to the grammar being implemented — the README’s hex-color parser example demonstrates this directly. The tradeoff is a learning curve: combinator composition and the IResult/Parser trait machinery take longer to internalize than a hand-written recursive-descent parser would.

Used by 7 apps in this directory

Rust
64%
Apache 2.0

agentgateway

AI Development · Developer Tools

4,420

An open source AI-native proxy that secures, observes, and governs agent-to-LLM, agent-to-tool, and agent-to-agent communication through MCP, A2A, and unified LLM routing.

View details
88
Repo Health
82
Technical
72
Dependency
Built with
Rust64%
Go24%
Updated yesterday
TypeScript
51%
MIT

Anarlog

Note Taking · AI Assistants · Productivity

9,087

Anarlog is an open-source, local-first AI meeting notetaker that records, transcribes, and summarizes meetings entirely on your device — no cloud lock-in, no mandatory account, and every note saved as a plain markdown file you own forever.

View details
86
Repo Health
77
Technical
69
Dependency
Built with
TypeScript51%
Rust38%
Updated today
TypeScript
55%
Other

Cap

Team Chat · Video Conferencing

20,986

Open source Loom alternative with GPU-accelerated recording, instant share links, AI summaries, and full self-hosting via Docker Compose.

View details
89
Repo Health
81
Technical
65
Dependency
Built with
TypeScript55%
Rust40%
Updated yesterday
Rust
87%
MIT

fabro

Developer Tools · Devops

1,516

Define AI agent workflows as code graphs, route tasks across any LLM, and intervene only where it matters.

View details
81
Repo Health
83
Technical
70
Dependency
Built with
Rust87%
TypeScript11%
Updated yesterday
Rust
96%
Apache 2.0

InfluxDB

Databases · Analytics

31,705

Open-source time-series database built for real-time ingest, fast SQL queries, and embedded Python automation — powered by Apache Arrow and Parquet.

View details
86
Repo Health
76
Technical
72
Dependency
Built with
Rust96%
Updated yesterday
Rust
100%
Other

Meilisearch

Search

59,012

Lightning-fast hybrid search engine with AI-powered semantic and full-text retrieval for modern applications.

View details
90
Repo Health
88
Technical
68
Dependency
Built with
Rust100%
Updated 5 days ago
Rust
89%
Apache 2.0

Qdrant

Databases · AI Development · Search

34,058

Open-source vector database and search engine built in Rust for production-grade AI applications — from semantic search to RAG pipelines and recommendation systems.

View details
92
Repo Health
87
Technical
69
Dependency
Built with
Rust89%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search