#encoding #toml #no-std

no-std toml_parser

Yet another format-preserving TOML parser

14 stable releases

Uses new Rust 2024

1.1.2+spec-1.1.0 Apr 1, 2026
1.1.1+spec-1.1.0 Mar 31, 2026
1.0.9+spec-1.1.0 Feb 16, 2026
1.0.6+spec-1.1.0 Dec 18, 2025
1.0.1 Jul 11, 2025

#314 in Parser implementations

Download history 3263920/week @ 2026-01-23 3442837/week @ 2026-01-30 3739791/week @ 2026-02-06 3883716/week @ 2026-02-13 4276417/week @ 2026-02-20 4880877/week @ 2026-02-27 5017173/week @ 2026-03-06 5023588/week @ 2026-03-13 5090053/week @ 2026-03-20 5110975/week @ 2026-03-27 5352100/week @ 2026-04-03 5753572/week @ 2026-04-10 5649025/week @ 2026-04-17 5847436/week @ 2026-04-24 5879566/week @ 2026-05-01 6532429/week @ 2026-05-08

24,979,043 downloads per month
Used in 14,449 crates (12 directly)

MIT/Apache

225KB
6.5K SLoC

TOML lexer and parser

Characteristics:

  • Error recovery
  • Lazy validation
  • forbid(unsafe) by default, requiring the unsafe feature otherwise
  • no_std support, including putting users in charge of allocation choices (including not allocating)

Full parsing is broken into three phases:

  1. [Lexing tokens][lexer]
  2. [Parsing tokens][parser] (push parser)
  3. Organizing the physical layout into the logical layout, including [decoding keys and values][decoder]

toml_parser

Documentation License Crates Status

Zero-copy parsing of TOML

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Dependencies

~0.9–2.6MB
~58K SLoC