Financial reports and a tablet on a meeting-room table.

noyalib-serde-yaml

serde_yaml. Without the archive notice.

One line in Cargo.toml. Zero changes to your source. Same functions, same errors, same behaviour, pinned by a contract suite captured from the original.

The one-line version

Rename the package in Cargo.toml and change nothing else:

[dependencies]
serde_yaml = { package = "noyalib-serde-yaml", version = "=0.0.42" }

Your code still says serde_yaml::from_str and serde_yaml::to_string, and it still gets serde_yaml::Value, Mapping, Number and the rest. The shim parses under a compatibility profile that matches the original's choices, and it renders errors in the same words. An 18-case contract suite, captured live from serde_yaml 0.9, pins that behaviour on every release.

The pin is exact on purpose. The shim releases in lockstep with the core at the same version, so =0.0.42 names one known pair.

What stays the same, and what does not

Three behaviours differ from the archived crate, and each defaults to the safer side:

  • Non-scalar mapping keys are refused, with the same "expected a string key" error serde_yaml 0.9 gave. That is the contract, not a gap.
  • Custom tags are preserved through the Value path instead of being dropped. A typed deserialise still ignores them.
  • Size and nesting limits are on by default. A document with millions of aliases or a thousand levels of nesting is an error, not an out-of-memory crash. The limits are configurable.

The full guide lists every function with its replacement and every note in detail.

Coming from a fork

The forks that appeared after the archive each need a slightly different route. Each guide has a TL;DR diff, a function table and a checklist.

Coming from Drop-in? Guide
serde_yml (marked deprecated) Mostly Guide
yaml_serde Yes, by package rename Guide
serde-yaml-ng Yes Guide
serde-norway Yes Guide
serde-yaml-bw No, different Value Guide
serde-saphyr No, streaming only Guide
yaml-spanned No, read only Guide

Moving to the native API later

When you want spans, strict typo detection, the lossless editor or the async parser, switch the import to noyalib and keep the same call shapes. Nothing forces the move, and the shim is maintained for as long as the core is.