YAML 1.2.2
One scanner and grammar across every API
EventStream, Value, flat-array Tape, owned and borrowed Serde decoding, SpannedTree, and frontmatter share one YAML 1.2.2 core verified by the pinned YAML Test Suite, 25+ core-hour fuzz soak, Miri, 41 Kani proofs, and 0-missed mutation testing.
How correctness is verified →
#![forbid(unsafe_code)]
Pure safe Rust with 2 runtime dependencies
Published workspace crates forbid unsafe code and avoid C/libyaml FFI. Direct runtime dependencies are serde and indexmap.
Dependency policy →
Hardened defaults
Native DoS limits & redacted errors
Every parse, decode, merge expansion, reader, and emit call enforces explicit ceilings for input bytes, depth, collections, events, and byte-weighted alias expansion. Error::masked() strips document text.
Security model →
Byte-accurate spans
Spanned<T>, SpannedTree & source-preserving edits
Attach byte spans to typed Serde fields, convert offsets to UTF-8, scalar, or UTF-16 positions via LineIndex, or apply comment-preserving edits verified with ayaml-edit.
Spans & editing →
Zero-copy & streaming
Measured against Rust and C/C++ peers
Streams typed reads directly from events at every input size, borrows unescaped scalars in place, and offers a flat-array Tape DOM plus ParserBuf recycling for zero-allocation steady-state bulk parsing.
Read benchmarks →
Incremental migration
Opt-in merge keys & libyaml-compat boundary
Adopt YAML 1.2.2 immediately while opting into <<: merge keys per call or enabling the additive libyaml-compat feature for legacy inputs.
Compatibility profile →