serde_yml is unmaintained. Migrate to a maintained alternative (noyalib, serde-saphyr, or yaml-rust2). See MIGRATION.md.
Expand description
§⚠️ serde_yml is deprecated — migrate to a maintained alternative
This crate is unmaintained. The 0.0.13 release is a thin
compatibility shim so existing call sites keep working while you
plan a migration. See MIGRATION.md
for the full guide.
§Maintained alternatives
noyalib— pure-Rust,#![forbid(unsafe_code)], drop-in via thecompat-serde-yamlfeature (zero call-site changes for typical users).serde-saphyr— modern parser, serde-integrated typed deserialisation. NoValueDOM — fits codebases that only callfrom_str::<MyStruct>.yaml-rust2— pure-Rust parser primitives, noserdewrapper. Fits users who were using the low-levelserde_yml::libyml/loadersurface (removed in this shim).
MIGRATION.md carries the per-crate mapping tables.
§Why the shim is backed by noyalib
The shim itself depends on noyalib’s compat-serde-yaml
feature for its implementation. This is an implementation
detail of the shim, not a recommendation that you must use
noyalib. Two things follow:
- No archived advisory chain. The previous C-FFI parser
(
libyml) andserde_yaml0.9 are gone from the dependency graph entirely; downstreamcargo audit/cargo denyruns stop flagging the unmaintained chain. - Safer defaults flow through.
#![forbid(unsafe_code)], YAML 1.2 strict booleans (the “Norway problem” fix), custom tags preserved asValue::Taggedrather than coerced.
If you want to evaluate noyalib directly, the
compat-serde-yaml feature exposes the same surface this shim
re-exports. If you’d rather pick a different alternative,
MIGRATION.md covers serde-saphyr and yaml-rust2.
§Stop-gap: keep using serde_yml = "0.0.13"
Existing call sites compile unchanged against this shim. Every
item below is marked #[deprecated], so the compiler will point
at the spots that need updating during your migration.
§Removed in 0.0.13 (vs. 0.0.12)
The deep internal modules that previous versions exposed —
serde_yml::libyml, serde_yml::loader, serde_yml::modules,
serde_yml::de::{Event, Progress}, serde_yml::ser::SerializerConfig,
serde_yml::value::Index, DocumentAnchor, State — are
gone in this release. They were implementation details of
the C-FFI parser that no longer exists. See MIGRATION.md for
the equivalence table per alternative.
Modules§
- mapping
Deprecated - YAML mapping type. Re-exported from
noyalib::compat::serde_yaml::mapping. - value
Deprecated - YAML value types. Re-exported from
noyalib::compat::serde_yaml::value. - with
Deprecated - Serde
#[serde(with = "...")]helpers. Re-exported fromnoyalib::compat::serde_yaml::with.
Structs§
- Deserializer
- A YAML deserializer.
- Location
- A
(line, column, byte index)location in a YAML document. - Mapping
- A YAML mapping (dictionary/object).
- Serializer
- A YAML serializer.
- Tag
- A YAML tag.
- Tagged
Value - A tagged YAML value.
Enums§
Functions§
- from_
reader - Deserialize a YAML document from any
std::io::Readsource. - from_
slice - Deserialize a YAML document from a byte slice.
- from_
str - Deserialize a YAML document into the target type.
- from_
value - Deserialize a typed value from a
Value. - to_
string - Serialize a typed value to a YAML string.
- to_
value - Serialize a typed value to a
Value. - to_
writer - Serialize a typed value to any
std::io::Writesink.