tomlini 0.1.0

SAX TOML/INI parser and editor. Zero-dependency, no footguns.
Documentation
  • Coverage
  • 61.15%
    85 out of 139 items documented0 out of 84 items with examples
  • Size
  • Source code size: 402.39 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.52 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 3s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • mcunha/tomlini
    0 0 0
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mcunha

tomlini

SAX TOML/INI parser and editor. Zero dependencies, three-tier (core/alloc/std).

Features

  • 18× faster parse than toml_edit (3.3 µs vs 59.5 µs for a 94-line Cargo.toml)
  • 2–3× faster edits with batch commit (single index build, descending sort, one-pass span fixup)
  • No footguns — every API path preserves formatting unless explicitly overridden
  • Three tiers: core (zero alloc), alloc (full editing), std (error impls)
  • Serde bridge via tomlini_serde for struct deserialization

Quick start

let mut doc = tomlini::parse("[server]\nport = 8080\n")?;

// Read
assert!(doc.has("server.port"));
let raw = doc.get("server.port").unwrap();         // "8080"
let val = doc.get_decoded("server.port").unwrap(); // "8080"

// Edit
doc.edit()
    .set("server.port", "9090")
    .insert("server", "host", "\"0.0.0.0\"")
        .with_above_comment("Bind address")
    .commit()?;

Feature flags

Feature What you get
(none) parse_into() — span emitter, zero alloc
alloc FlatDoc, parse(), full editing API
std (default) std::error::Error impls

License

MIT OR Apache-2.0