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_yaml0.9 gave. That is the contract, not a gap. - Custom tags are preserved through the
Valuepath 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.
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.