Registry / config / toml-edit

toml-edit

JSON →
library0.25.12+spec-1.1.0rscratesunverified

Yet another format-preserving TOML parser.

# Cargo.toml [dependencies] toml_edit = "0.25.12+spec-1.1.0"
INSTALL
IMPORT
SIG · TOML-EDIT
T
toml-edit
configrustv0.25.12+spec-1.1.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Document
✓ use toml_edit::Document;

Parses a TOML string and accesses a value.

use toml_edit::Document; let toml = "[package]\nname = \"my_crate\"\n"; let doc = toml.parse::<Document>().unwrap(); println!("{}", doc["package"]["name"].as_str().unwrap());
Debug
Known issues
gotchaEditing operations may not preserve all formatting if not done carefully.
fix
Use the `toml_edit::Document` API for format-preserving edits.
affects: >=0.25.0
Upgrade
Version history
0.25.12+spec-1.1.0latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
25 hits · last 30 days
node
24
Resources
toml-edit — cargo add toml-edit · libregistry