Safe and fast parsers with Nom and Rust
summary
Nom is a Rust parser‑combinator library that produces zero copy streaming parsers with Rust’s ownership and zero cost abstractions, interoperates with C, and targets memory safety without GC. It implements bitstream parsing, an incomplete indicator for streaming, and debugging helpers like dbg_dmp plus chained error traces. Benchmarks include MP4 and HTTP comparisons that show Nom matching or beating handwritten C and Scala parsers, about 50 GitHub adopters after a year, and fuzzing finds bugs mainly in manual length calculations rather than in Nom itself.
AI-written summary · about
chapters (33)
- 0:00Intro
- 0:44What is Clever Cloud ?
- 1:16VideoLAN
- 1:34VLC media player, in 2015
- 2:18Origin of vulnerabilities
- 3:13We need a practical solution
- 4:36Modeling vulnerabilities
- 5:03describing the input language
- 7:15Finding the ambiguities
- 7:41Matching implementations
- 8:54Increasing state space
- 10:50Format gotchas
- 13:18Real world formats
- 14:22Fixing manual parsing
- 15:57The promise of Rust
- 16:44Slices
- 17:51How nom looks like
- 18:39Basic types
- 18:59Generics
- 19:24usual combinators and parsers
- 19:48Zero copy
- 20:20Performance
- 21:56Incomplete
- 23:28Debugging
- 24:23Error management
- 25:08Error macro
- 26:15A chain of errors
- 26:27pattern matching
- 27:48Colorful hexdump
- 28:38Existing parsers
- 29:45Summing up
- 31:17Questions ?
- 34:36Bit stream parsing
related talks
36mSafe and fast parsers with Nom and Rust
41mParsing Safely, from 500MB/s to 2GB/s
30mIntegrating some Rust in VLC media player
36mWriting a Zero-Copy Database Parser from the Ground Up
33mIntegrating Some Rust in VLC Media Player
40mWhy Rust?
17mPerformant, Readable and Interoperable Rust from Dafny
16mEmpowering Fearless Data Engineering
