Recursive AI
oneyamlRustAvailable

oneyaml for Rust

Typed reads with serde and lossless, comment-preserving edits for YAML 1.2, in one crate.

cargo add oneyaml

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
main.rsRust
// 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

Go further