toml

A native Rust encoder and decoder for TOML with first-class Serde support.

Library
Cargo
v1.1.4+spec-1.1.0
1,068stars
Apache License 2.0

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
76/100Good
Development Activity96
Maintenance52
Community68
Maturity60
Momentum28

Technical Analysis

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

toml is a native Rust library for reading and writing TOML, the configuration format used by Cargo and much of the Rust ecosystem. It implements the standard Serde Serialize and Deserialize traits, so you can turn a TOML document straight into strongly typed Rust structs and serialize them back out with the same derive macros you already use for JSON or YAML.

Beyond struct mapping, it exposes a dynamic Table and Value model for working with arbitrary documents, supports no_std targets, and can preserve key order when built with the appropriate feature. It sits atop a focused stack of sibling crates (toml_parser, toml_edit, toml_datetime, toml_writer) that power format-preserving editing and low-level parsing when you need them.

What You Get

  • Serde-powered from_str / to_string helpers that map TOML directly to and from typed Rust structs
  • A dynamic Table and Value model for reading arbitrary documents without a predefined schema
  • Spec-compliant parsing validated against the official toml-test suite for both decoding and encoding
  • no_std support and optional features for preserving map key order and tuning hashing
  • Access to sibling crates (toml_edit, toml_parser) for format-preserving edits and low-level control

Common Use Cases

  • Loading application and tool configuration files into typed settings structs
  • Reading and writing Cargo-style manifest and metadata files
  • Serializing Rust data structures out to human-readable TOML for storage or interchange
  • Inspecting TOML documents dynamically when the schema is not known ahead of time

Under The Hood

Architecture The crate is organized as the deserialization (src/de) and serialization (src/ser) halves of a Serde codec built on a dynamic data model in src/value.rs, src/table.rs, and src/map.rs. Parsing flows through the sibling toml_parser crate, which lexes and parses spans that are then materialized into typed Rust values or a Value tree; serialization mirrors this by walking values through a document strategy in src/ser/document and emitting text via toml_writer. It lives in a Cargo workspace alongside toml_edit, toml_datetime, and serde_spanned, each owning one concern so the top-level crate stays focused on the Serde surface.

Tech Stack It is written in Rust targeting the 2024 edition with a stated MSRV of 1.85. Core dependencies are serde_core for the trait plumbing, winnow as the parser-combinator engine behind toml_parser, and toml_datetime for TOML’s datetime type; optional dependencies include indexmap (for key-order preservation) and foldhash. Feature flags gate std, serde, parse, display, and preserve_order, allowing no_std and minimal builds.

Code Quality The crate carries an extensive test tree covering decoder and encoder behavior, serde round-trips, and snapshot fixtures, and it wires in the official toml-test conformance harness through custom decoder_compliance and encoder_compliance test targets. Clippy configuration and pre-commit hooks are checked in at the workspace root, and runnable examples (decode.rs, toml2json.rs) document real usage. The result is a mature, well-covered codebase rather than a thinly tested one.

API Design The public surface is deliberately small and predictable: toml::from_str and toml::to_string cover the common typed path, while a FromStr-based Table plus the Value enum handle dynamic access, so most users get productive with a single function call. Naming follows Serde conventions developers already know, thorough rustdoc is published on docs.rs, and heavier needs are cleanly delegated to toml_edit rather than bloating this crate’s API.

Used by 27 apps in this directory

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
Dart
74%
AGPL 3.0

AppFlowy

Productivity · Project Management · Collaboration

75,729

The open-source AI workspace that puts your data, your rules — with local LLMs, CRDT collaboration, and full self-hosting built in.

View details
66
Repo Health
81
Technical
66
Dependency
Built with
Dart74%
Rust24%
Updated 1 weeks ago
TypeScript
49%
AGPL 3.0

BrowserOS

Browser · AI Assistants

13,248

The open-source agentic Chromium browser with native AI agents, MCP server, and visual workflow automation — your data never leaves your machine.

View details
87
Repo Health
82
Technical
69
Dependency
Built with
TypeScript49%
Rust22%
Python16%
Updated today
Rust
54%
Other

Cameleer

AI Agents

23

A local-first desktop workspace for managing AI agents in an enterprise-style workflow — agent directory, Kanban task tracking, workspace chat, and a full runtime/audit log of agent actions and tool approvals.

View details
48
Repo Health
65
Technical
76
Dependency
Built with
Rust54%
JavaScript24%
TypeScript15%
Updated 4 weeks ago
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
95%
MIT

claw-code

AI Agents · AI Code Assistants

195,087

A Rust-built CLI agent harness for Claude AI with persistent sessions, MCP tool integration, plugin hooks, and multi-provider support — designed to run autonomous coding workflows without human babysitting.

View details
71
Repo Health
71
Technical
77
Dependency
Built with
Rust95%
Updated 3 days ago
C++
69%
Apache 2.0

ClickHouse

Databases · Analytics · Data Engineering

49,325

Open-source column-oriented database that delivers real-time analytical queries on petabyte-scale data with millisecond latency.

View details
95
Repo Health
90
Technical
68
Dependency
Built with
C++69%
Python13%
Updated today
Go
32%
Apache 2.0

CubeSandbox

Developer Tools · Security · AI Agents

11,247

Instant, concurrent, hardware-isolated MicroVM sandboxes for AI agents — E2B-API compatible, sub-60ms cold starts, and a built-in zero-trust egress proxy, all self-hostable at scale.

View details
83
Repo Health
88
Technical
63
Dependency
Built with
Go32%
Rust31%
C21%
Updated today
Rust
100%
Other

Fluree DB

Databases

445

A temporal, verifiable graph database with git-like branching, integrated vector/text/geo search, and RDF/SPARQL/JSON-LD/openCypher support — benchmarked at 10.4x faster than the next database on the full Wikidata dump.

View details
86
Repo Health
74
Technical
65
Dependency
Built with
Rust100%
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