winnow

Rust parser combinator library forked from nom with improved ergonomics. Build parsers by composing small parsers: alpha1 for letters, digit1 for digits, tuple for sequences, alt for alternatives. No code generation required — parsers are regular Rust functions. Used for parsing custom text formats, binary protocols, configuration files, and command output in agent data processing.

Evaluated Mar 06, 2026 (0d ago) v0.6+
Homepage ↗ Repo ↗ Developer Tools rust parsing combinators nom text binary streaming zero-copy
⚙ Agent Friendliness
66
/ 100
Can an agent use this?
🔒 Security
86
/ 100
Is it safe for agents?
⚡ Reliability
80
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
83
Error Messages
82
Auth Simplicity
95
Rate Limits
95

🔒 Security

TLS Enforcement
88
Auth Strength
85
Scope Granularity
82
Dep. Hygiene
90
Secret Handling
88

Parser library — no network exposure. Rust memory safety prevents parser buffer overflows. Community-maintained.

⚡ Reliability

Uptime/SLA
83
Version Stability
78
Breaking Changes
72
Error Recovery
86
AF Security Reliability

Best When

You're writing a Rust parser for a custom text or binary format and want composable, type-safe combinators with excellent error messages.

Avoid When

You need grammar-based parsing for a formal language — use pest or tree-sitter for grammar-file-based parsers.

Use Cases

  • Parse custom agent data formats, log files, and configuration syntax with composable combinator parsers
  • Build binary protocol parsers for agent network communication without external parser generators
  • Parse structured text from agent LLM outputs (JSON-like formats, markdown sections) with type-safe Rust parsers
  • Implement config file parsers for agent tools using winnow's human-readable error messages for user-facing parse errors
  • Stream-parse large agent data files incrementally without loading full content into memory using winnow's streaming parsers

Not For

  • Full programming language parsers — use tree-sitter or pest for grammar-based parsing of complex languages
  • Simple regex-based extraction — if a regex suffices, winnow is overkill; use Rust's regex crate for pattern matching
  • Non-Rust code — winnow is Rust-only; use nom (Python/JS), pyparsing, or Parsec (Haskell) for other languages

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
Yes
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

Parser library — no authentication.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

Community-maintained open source. MIT/Apache 2.0 dual license.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • winnow parsers consume input by advancing the input position — if a parser fails partway, the input is partially consumed; use backtracking combinators (opt(), alt()) to handle partial match failures
  • The IResult type for streaming parsers differs from non-streaming — streaming parsers return Incomplete when more data is needed; non-streaming agents should use the complete module
  • winnow vs nom API differences: winnow uses &mut impl Stream trait instead of nom's &[u8] or &str — old nom code cannot be directly copy-pasted into winnow without modification
  • Error handling in winnow uses ErrMode::Backtrack vs ErrMode::Cut — using cut() past an alt() branch prevents the alt from trying the next parser; incorrect cut placement causes 'expected X' errors
  • Zero-copy parsing borrows from the input — parsers returning &str references have lifetime tied to the input string; cloning with .to_string() is needed to store results beyond input lifetime
  • winnow's streaming mode doesn't work with parsers that use take_while and check for EOF — streaming parsers must handle Incomplete by buffering more input before retrying

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for winnow.

$99

Scores are editorial opinions as of 2026-03-06.

5208
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered