yaml-rust2
A fully YAML 1.2 compliant YAML parser
0.12.0
53M downloads/mo
#1189 most downloaded on crates.io
Ethiraric/yaml-rust2
What this package is like to depend on
Last release 5 days ago
18 Aug 2026
Release timing varies
gaps range from 1 weeks to 8 months
Nearly every release is documented
notes for 14 of 14 stable releases
Nothing withdrawn
no release was ever pulled
3 years old
14 releases · first in 2024
4 releases in the last 12 months
see the full history below
Release timeline
14 releases · Feb 2024 to Aug 2026Releases
latest 14-
0.12.018 Aug 2026Release notes
Open source →Changes:
- The minimum supported Rust version is now v1.85.0.
hashlinkwas upgraded to v0.12.1.quickcheck(dev-only dependency) was upgraded to v1.1.0.toml(dev-only dependency) was upgraded to v1.1.4.- (#79) corrected the
documentation for
Marker::index.
-
0.11.118 Aug 2026Release notes
Open source →Changes:
- (#78) Fix parsing short YAML documents to avoid infinite loops.
-
0.11.016 Dec 2025Release notes
Open source →Changes:
- The
actions/checkoutgithub actions dependency was updated. - The
hashlinkdependency was updated tov0.11.
- The
-
0.10.414 Sep 2025Release notes
Open source →- Parse
True,TRUE,FalseandFALSEas bools instead of strings.
This is in line with the core schema. - Fixed build with
--no-default-features(#60)
Release notes
Open source →Bug fixes:
- Parse
True,TRUE,FalseandFALSEas bools instead of strings. This is in line with the core schema.
- Parse
-
0.10.309 Jun 2025Release notes
Open source →Changes
- Exclude
yaml-test-suitefrom the Cargo package.
This reverts the license changes from last version. - 399f481: Bump
libtest-mimicfrom dev-dependencies
Release notes
Open source →Changes:
- Exclude
yaml-test-suitefrom the Cargo package. This reverts the license changes from last version. - 399f481: Bump
libtest-mimicfrom dev-dependencies
- Exclude
-
0.10.220 May 2025Release notes
Open source →Bug fixes
- Parse
(?i)[+-]?(?:inf|infinity|nan)as strings instead of floats
Changes
- Merge license files and respect
yaml-test-suiteMIT license. This means we
now correctly state that this crate can not be licensed under only the
Apache-2.0 license.
Please review your license requirement following this release.
Release notes
Open source →Bug fixes:
- Parse
(?i)[+-]?(?:inf|infinity|nan)as strings instead of floats
Changes:
- Merge license files and respect
yaml-test-suiteMIT license. This means we now correctly state that this crate can not be licensed under only the Apache-2.0 license.
- Parse
-
0.10.126 Mar 2025 -
0.10.011 Feb 2025Release notes
Open source →Breaking Changes
- Update dependencies.
hashlinkhad a bogus requirement of>= 0.8, < 0.10, sorry. As mentioned here, range requirements shouldn't be used and I haven't been vigilant enough when reviewing. The requirement is now set to0.10.
Changes
- Force quotes on
yandnto appease the YAML 1.1 lords.
Release notes
Open source →Breaking Changes:
-
Update dependencies.
hashlinkhad a bogus requirement of>= 0.8, < 0.10, sorry. As mentioned here, range requirements shouldn't be used and I haven't been vigilant enough when reviewing. The requirement is now set to0.10.
Changes:
- Force quotes on
yandnto appease the YAML 1.1 lords.
- Update dependencies.
-
0.9.025 Sep 2024Release notes
Open source →Breaking Changes
- Update dependencies.
Sincehashlinkis exposed (throughYaml::Hash) and has been updated from 0.8.4 to 0.9.1, the new version ofyaml-rust2will not link properly if you explicitly rely onhashlink v0.8.
Existing code with v0.8.4 should still compile fine in v0.9.1 (see hashlink's v0.9.0 changelog).
Bug fixes
- (#37)
Parse empty scalars as""instead of"~".
Features
- Add
Yaml::is_hash. - Add better doccomments to the
IndexandIntoIteratorimplementations forYamlto better explain their quirks and design decisions.
Release notes
Open source →Breaking Changes:
-
Update dependencies.
Since
hashlinkis exposed (throughYaml::Hash) and has been updated from 0.8.4 to 0.9.1, the new version ofyaml-rust2will not link properly if you explicitly rely onhashlink v0.8. Existing code with v0.8.4 should still compile fine in v0.9.1 (see hashlink's v0.9.0 changelog).
Bug fixes:
- (#37)
Parse empty scalars as
""instead of"~".
Features:
- Add
Yaml::is_hash. - Add better doccomments to the
IndexandIntoIteratorimplementations forYamlto better explain their quirks and design decisions.
- Update dependencies.
-
0.8.131 May 2024Release notes
Open source →Bug fixes
-
(#29) Fix parsing failing for deeply indented scalar blocks.
-
(#21-comment) Fix parsing failing with comments immediately following a YAML tag.
Features
-
(#19)
Yamlnow implementsIndexMut<usize>andIndexMut<&'a str>. These functions may not return a mutable reference to aBAD_VALUE. Instead,index_mut()will panic if either:- The index is out of range, as per
IndexMut's requirements - The inner
Yamlvariant doesn't matchYaml::ArrayforusizeorYaml::Hashfor&'a str
- The index is out of range, as per
-
Use cargo features
This allows for more fine-grained control over MSRV and to completely remove debug code from the library when it is consumed.
The
encodingfeature, governing theYamlDecoder, has been enabled by default. Users of@davvid's fork ofyaml-rustor ofyaml-rust2might already use this. Users of the originalyaml-rustcrate may freely disable this feature (cargo <...> --no-default-features) and lower MSRV to 1.65.0. -
Duplicate keys no longer allowed
Instead of silently choosing one of two values sharing the same key in a mapping, we now issue an error. This behavior is part of the YAML specification, but not tested by the
yaml-test-suite(the parser needs to emit events for both key-values). Additionally, there is no standard way of defining which value should be chosen in case of a duplicate.
Release notes
Open source →Bug fixes:
-
(#29) Fix parsing failing for deeply indented scalar blocks.
-
(#21-comment) Fix parsing failing with comments immediately following a YAML tag.
Features:
-
(#19)
Yamlnow implementsIndexMut<usize>andIndexMut<&'a str>. These functions may not return a mutable reference to aBAD_VALUE. Instead,index_mut()will panic if either:- The index is out of range, as per
IndexMut's requirements - The inner
Yamlvariant doesn't matchYaml::ArrayforusizeorYaml::Hashfor&'a str
- The index is out of range, as per
-
Use cargo features
This allows for more fine-grained control over MSRV and to completely remove debug code from the library when it is consumed.
The
encodingfeature, governing theYamlDecoder, has been enabled by default. Users of@davvid's fork ofyaml-rustor ofyaml-rust2might already use this. Users of the originalyaml-rustcrate may freely disable this feature (cargo <...> --no-default-features) and lower MSRV to 1.65.0. -
Duplicate keys no longer allowed
Instead of silently choosing one of two values sharing the same key in a mapping, we now issue an error. This behavior is part of the YAML specification, but not tested by the
yaml-test-suite(the parser needs to emit events for both key-values). Additionally, there is no standard way of defining which value should be chosen in case of a duplicate.
-
-
0.8.026 Mar 2024Release notes
Open source →Breaking Changes:
- The
encodinglibrary has been replaced withencoding_rs. If you use thetrapofYamlDecoder, this change will make your code not compile. An additional enumYamlDecoderTraphas been added to abstract the underlying library and avoid breaking changes in the future. This additionally lifts theencodingdependency on your project if you were using that feature.- The signature of the function for
YamlDecoderTrap::Callhas changed: - The
encoding::types::DecoderTraphas been replaced withYamlDecoderTrap.
Please refer to the// Before, with `encoding::types::DecoderTrap::Call` fn(_: &mut encoding::RawDecoder, _: &[u8], _: &mut encoding::StringWriter) -> bool; // Now, with `YamlDecoderTrap::Call` fn(_: u8, _: u8, _: &[u8], _: &mut String) -> ControlFlow<Cow<'static str>>;YamlDecoderTrapFndocumentation for more details.
- The signature of the function for
Features:
-
Tags can now be retained across documents by calling
keep_tags(true)on aParserbefore loading documents. (#10 (#12) -
YamlLoaderstructs now have adocuments()method that returns the parsed documents associated with a loader. -
Parser::new_from_str(&str)andYamlLoader::load_from_parser(&Parser)were added.
Development:
- Linguist attributes were added for the
tests/*.rs.incfiles to prevent github from classifying them as C++ files.
- The
-
0.7.020 Mar 2024Release notes
Open source →Features:
-
Multi-line strings are now emitted using block scalars.
-
Error messages now contain a byte offset to aid debugging. (#176)
-
Yaml now has
orandborrowed_ormethods. (#179) -
Yaml::load_from_bytes()is now available. (#156) -
The parser and scanner now return Err() instead of calling panic.
Development:
-
-
0.6.015 Mar 2024Release notes
Open source →Development:
-
is_xxxfunctions were moved into the privatechar_traitsmodule. -
Benchmarking tools were added.
-
Performance was improved.
-
-
0.5.008 Feb 2024