oneyaml for Rust
Typed reads with serde and lossless, comment-preserving edits for YAML 1.2, in one crate.
A quick look
Read typed data with serde, then edit the document in place. The edit changes only what you touched, and the comment stays.
Full docs on docs.rs// serde: typed reads and writes let cfg: Config = oneyaml::from_str(text)?; // The lossless document: edit in place let mut doc = Document::parse(text)?; doc.set_path("server.port", 9090)?; // Everything else, comments included, // stays byte for byte.
The crate
- Conformance
402 of 402 cases on the yaml-test-suite.
- Safety
No
unsafe, no panics on any input, and aLimits::untrusted()profile for network input. Fuzzed. - Rust
1.85 or newer.
- License
MIT or Apache-2.0.