libyml
DEPRECATED — `libyml` is unmaintained. This release is a thin compatibility shim that forwards every call to `unsafe-libyaml` (the upstream C-libyaml translation `libyml` was originally forked from). Please migrate to `unsafe-libyaml`, `yaml-rust2`, or `noyalib`.
0.0.6
22M downloads/mo
#1999 most downloaded on crates.io
sebastienrousseau/libyml
What this package is like to depend on
Last release 2 months ago
29 May 2026
Ships unpredictably
gaps range from 4 weeks to 1.8 years
Most releases are documented
notes for 4 of 6 stable releases
Nothing withdrawn
no release was ever pulled
2 years old
6 releases · first in 2024
1 release in the last 12 months
see the full history below
Release timeline
6 releases · Apr 2024 to May 2026Releases
latest 6-
0.0.629 May 2026Release notes
Open source →⚠️ libyml is deprecated — migrate to a maintained alternative
libymlis unmaintained. v0.0.6 is a thin compatibility shim
that forwards every call to the upstream
unsafe-libyaml(which
libymlwas originally forked from), so existing call sites keep
working while you plan a migration.Security — RUSTSEC-2025-0067 fixed in 0.0.6
RUSTSEC-2025-0067
flagged alllibyml ≤ 0.0.5as unsound — the
libyml::string::yaml_string_extendfunction had a code path
that could trigger undefined behaviour. v0.0.6 removes the
vulnerable surface entirely — the entirelibyml::string
module is gone from the source tree alongside the rest of the
hand-translated C-libyaml copy, and every public function is now
re-exported fromunsafe-libyaml.cargo auditwill still warn anyway because the RustSec
advisory database tracks the crate's unmaintained status rather
than code presence. See the README's "cargo audit" section
for a copy-paste.cargo/audit.tomlsnippet.Maintained alternatives
Crate Migration shape Best fit unsafe-libyamlDrop-in upstream — rename PascalCase types/consts to snake_case / SCREAMING_SNAKE_CASE Codebases that want to stay on the raw libyaml-shaped FFI API on a maintained backend yaml-rust2Not FFI-shaped — YamlLoader::load_from_strreturns aYamlASTUsers who want to drop the C-libyaml model entirely while keeping a low-level parser primitive in pure Rust noyalibHigher-level typed API ( from_str::<T>/Value); pure-Rust,#![forbid(unsafe_code)]Users who can move from event-stream parsing to typed deserialisation Full mapping tables and behavioural notes:
MIGRATION.md.What changed in 0.0.6
- ~18 000 lines of hand-translated C-libyaml code deleted from
src/; every public function is now re-exported from
unsafe-libyaml. - Historical path-form sub-modules (
libyml::api,
libyml::decode,libyml::document,libyml::dumper,
libyml::loader,libyml::yaml,libyml::success) retained
as thin re-exports. libyml::memoryandlibyml::stringretained as empty stub
modules with deprecation notes (their former contents — the
C-allocator wrappers and theyaml_string_extendunsound
helper — are gone).Cargo.toml: single runtime dep onunsafe-libyaml = "0.2.11".
Dual-licensed MIT / Apache-2.0 (was MIT-only) to match upstream.- v0.0.5 test and example files retained where they survive the
shim's compatibility boundary, so the migration shape is
visible side-by-side with the working tree.
Breaking changes (documented in
MIGRATION.md)Most downstream code compiles unchanged against this shim. Three
deltas flow through from the upstream:c_int→boolfor boolean parameters
(yaml_scalar_event_initialize(..., 1, 1, …)→
yaml_scalar_event_initialize(..., true, true, …)).libyml::success::Successis no longer a nameable type —
read.okon return values directly.- PascalCase enum variants stay valid in value position but
rename toYAML_*SCREAMING_SNAKE_CASE inmatcharms.
Diff at a glance
76 files changed, 2 449 insertions, 20 584 deletions.
- ~18 000 lines of hand-translated C-libyaml code deleted from
-
0.0.524 Aug 2024Release notes
Open source →Release v0.0.5 - 2024-08-24
LibYML (a fork of unsafe-libyaml)
LibYML is a Rust library for working with YAML data, forked from unsafe-libyaml. It offers a safe and efficient interface for parsing, emitting, and manipulating YAML data.
Features
- Serialization and Deserialization: Easy-to-use APIs for serializing Rust structs and enums to YAML and vice versa.
- Custom Struct and Enum Support: Seamless serialization and deserialization of custom data types.
- Comprehensive Error Handling: Detailed error messages and recovery mechanisms.
- Streaming Support: Efficient processing of large YAML documents.
- Alias and Anchor Support: Handling of complex YAML structures with references.
- Tag Handling: Support for custom tags and type-specific serialization.
- Configurable Emitter: Customizable YAML output generation.
- Extensive Documentation: Detailed docs and examples for easy onboarding.
- Safety and Efficiency: Minimized unsafe code with an interface designed to prevent common pitfalls.
Changelog 📚
Merge pull request #4 from sebastienrousseau/feat/libyml
What's Changed
- feat(libyml): ✨ v0.0.5 by @sebastienrousseau in #4
Full Changelog: v0.0.4...v0.0.5
-
0.0.420 Jul 2024Release notes
Open source →Release v0.0.4 - 2024-07-20
LibYML (a fork of unsafe-libyaml)
This library is a fork of unsafe-libyaml, a version of libyaml translated from C to unsafe Rust with the assistance of c2rust.
This project, has been renamed to LibYML for simplicity and to avoid confusion with the original unsafe-libyaml crate which is now archived and no longer maintained.
New Features
-
Code Decoupling: Major refactoring to improve modularity:
- Created
document.rsanddecode.rsto decouple functionality fromapi.rs - Introduced
memory.rsfor memory management functions - Added
internal.rsfor internal helper functions
- Created
-
Enhanced Memory Management: Implemented dedicated functions for memory allocation, reallocation, and freeing in
memory.rs -
Default Trait Implementation: Added Default trait implementation for YAML types
Improvements
-
Error Handling: Implemented consistent error handling throughout the codebase
-
Code Formatting: Resolved various formatting issues and addressed Clippy warnings
-
Documentation: Minor tweaks and versioning updates in the documentation
Bug Fixes
- Fixed a critical segmentation fault issue
- Resolved several compiler warnings and errors:
- Removed unnecessary qualifications
- Fixed unneeded
returnstatements - Corrected misuse of
assert_eq!with boolean literals
Testing
- Expanded Test Suite:
- Added numerous new unit tests across different modules
- Enhanced and reorganized the YAML parser test suite
- Implemented specific tests for
yaml.rsandyaml_malloc
Other Changes
- Updated CodeCov token for improved coverage reporting
- Minor changes to library management
Installation
[dependencies] libyml = "0.0.4"
Release notes are available under GitHub releases.
Rust Version Compatibility
This library is compatible with Rust 1.60 and above.
License
MIT license, same as libyaml.
Changelog 📚
- 0.0.4 by @sebastienrousseau in #3
Full Changelog: 0.0.3...v0.0.4
-
-
0.0.328 May 2024Release notes
Open source →LibYML (a fork of unsafe-libyaml)
This library is a fork of unsafe-libyaml, a version of libyaml translated from C to unsafe Rust with the assistance of c2rust.
This project, has been renamed to LibYML for simplicity and to avoid confusion with the original unsafe-libyaml crate which is now archived and no longer maintained.
Credits and Acknowledgements
This library is a fork of the excellent work done by David Tolnay and the maintainers of the unsafe-libyaml library.
LibYML has now evolved into a separate library with its own goals and direction in mind and does not intend to replace the original unsafe-libyaml crate.
If you are currently using unsafe-libyaml in your projects, we recommend carefully evaluating your requirements and considering the stability and maturity of the original library as well as looking at the features and improvements offered by other libraries in the Rust ecosystem.
I would like to express my sincere gratitude to David Tolnay and the unsafe-libyaml and libyaml maintainers for their valuable contributions to the Rust and C programming communities.
[dependencies] libyml = "0.0.3"
Release notes are available under GitHub releases.
Rust Version Compatibility
This library is compatible with Rust 1.60 and above.
License
MIT license, same as libyaml.
Changelog 📚
Enhancements
Forked unsafe-libyaml
- Hard reset: Hard reset to the latest @dtolnay latest release to keep traceability and retain commits history to the original unsafe-libyaml codebase and credits to the maintainers.
- Renaming: This project, has been renamed to
LibYMLfor simplicity and to avoid confusion with the original unsafe-libyaml crate which is now archived and no longer maintained.
Changes:
-
Build:
- Minor updates on linting conditions to improve code quality.
-
Chore:
- Upgraded library version to 0.0.3 for enhanced functionality.
-
Fixes:
- Removed incorrect copyrights that were present.
- Fixed formatting issues in the codebase.
- Updated documentation in
lib.rsfor clarity. - Resolved a breaking test issue.
- Addressed missing_docs warnings.
- Resolved a warning related to type implementation.
- Refactored CI workflows for better efficiency.
- Ensured consistent code formatting.
What's Changed
- 0.0.2 by @sebastienrousseau in #1
- 0.0.3 by @sebastienrousseau in #2
New Contributors
- @sebastienrousseau made their first contribution in #1
Full Changelog: https://github.com/sebastienrousseau/libyml/commits/0.0.3
-
0.0.228 May 2024Nothing published for this version
-
0.0.128 Apr 2024Nothing published for this version