oneyaml

YAML that means the same thing everywhere. Edits that keep your comments.

oneyaml is a family of YAML 1.2 libraries, one per language. Each is written from scratch to feel native in its language, and all of them read, write and edit YAML the same way.

cargo add oneyaml

Change one value. Everything else stays exactly as you wrote it.

config.yamlBefore
# Web service
server:
  host: 0.0.0.0
  port: 8080   # public
tags: [web]
set server.port, add a tagAfter
# Web service
server:
  host: 0.0.0.0
  port: 9090   # public
tags: [web, api]

One parser, one meaning

Typed reads and the editable document share one parser, so they never disagree about what a file means.

Minimal-diff edits

An untouched file writes back byte for byte. An edit changes only the value you set, in its own style.

Correct YAML 1.2

yes is a string and 0755 is a decimal. YAML 1.1 behavior is opt-in, never a surprise.

Safe on any input

No crashes on hostile files. Limits on nesting and alias expansion are on by default.

Languages

Conformance

Checked, not promised.

The libraries share behavior, not code. One open test suite holds that behavior as data: the full YAML test suite plus cases for edits, patches, errors and safety. Every library runs it before release, and so can you, against any YAML library.