Read and write YAML in Rust
The data-binding API is what most projects need. from_str reads a document
into a typed struct through serde, and to_string writes it back. It handles
anchors, merge keys, block scalars, custom tags and multi-document streams. A
strict mode reports a misspelt field with the name it probably meant.
Every deserialise fixture measured is faster than every other pure-Rust YAML crate, by 1.1 to 2 times. Serialising is 3 to 4 times faster than the closest maintained fork. The benchmarks name the host, the toolchain and the command, so you can rerun them.
Replace serde_yaml without touching your source
serde_yaml was archived in 2024. noyalib-serde-yaml keeps its API, its
error text and its behaviour on the 18-case contract captured from the
original, so a package rename in Cargo.toml is the whole migration. When you
are ready, the native API is one import away.
Format and validate in your build
noyafmt formats a file or a tree in place, or checks it and exits non-zero.
noyavalidate checks a document against a JSON Schema and can fix what it
safely can. Both install with one Cargo command, ship as signed binaries for
Linux, macOS and Windows, and run in a container.
See problems in your editor
noyalib-lsp is a language server for VS Code, Zed, Neovim and anything else
that speaks the protocol. It reports parse errors as you type, formats on
save, and shows the description from a JSON Schema when you hover a key.
Let an AI agent edit YAML safely
noyalib-mcp is a Model Context Protocol server. An assistant can read a
value at a path, set it, or update several documents in a stream. Edits go
through the lossless tree, so a change to one line leaves every comment and
every other line exactly as it was.
Parse in the browser or at the edge
noyalib-wasm is the same parser compiled to WebAssembly and published on
npm. It parses, serialises, validates against a JSON Schema and reads values
at a path, with no server and no network. The playground on
this site is that bundle, unchanged.