PackageTrack
Sign in Get early access

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 2026
2025 2026
Release Pre-release

Releases

latest 6
  1. 0.0.6 29 May 2026
    Release notes

    ⚠️ libyml is deprecated — migrate to a maintained alternative

    libyml is unmaintained. v0.0.6 is a thin compatibility shim
    that forwards every call to the upstream
    unsafe-libyaml (which
    libyml was 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 all libyml ≤ 0.0.5 as unsound — the
    libyml::string::yaml_string_extend function had a code path
    that could trigger undefined behaviour. v0.0.6 removes the
    vulnerable surface entirely
    — the entire libyml::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 from unsafe-libyaml.

    cargo audit will 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.toml snippet.

    Maintained alternatives

    Crate Migration shape Best fit
    unsafe-libyaml Drop-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-rust2 Not FFI-shaped — YamlLoader::load_from_str returns a Yaml AST Users who want to drop the C-libyaml model entirely while keeping a low-level parser primitive in pure Rust
    noyalib Higher-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::memory and libyml::string retained as empty stub
      modules with deprecation notes (their former contents — the
      C-allocator wrappers and the yaml_string_extend unsound
      helper — are gone).
    • Cargo.toml: single runtime dep on unsafe-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:

    1. c_intbool for boolean parameters
      (yaml_scalar_event_initialize(..., 1, 1, …)
      yaml_scalar_event_initialize(..., true, true, …)).
    2. libyml::success::Success is no longer a nameable type
      read .ok on return values directly.
    3. PascalCase enum variants stay valid in value position but
      rename to YAML_* SCREAMING_SNAKE_CASE in match arms.

    Diff at a glance

    76 files changed, 2 449 insertions, 20 584 deletions.

    Open source →
  2. 0.0.5 24 Aug 2024
    Release notes

    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

    Full Changelog: v0.0.4...v0.0.5

    Open source →
  3. 0.0.4 20 Jul 2024
    Release notes

    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.rs and decode.rs to decouple functionality from api.rs
      • Introduced memory.rs for memory management functions
      • Added internal.rs for internal helper functions
    • 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 return statements
      • 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.rs and yaml_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 📚

    Full Changelog: 0.0.3...v0.0.4

    Open source →
  4. 0.0.3 28 May 2024
    Release notes

    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 LibYML for 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.rs for 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

    New Contributors

    Full Changelog: https://github.com/sebastienrousseau/libyml/commits/0.0.3

    Open source →
  5. 0.0.2 28 May 2024

    Nothing published for this version

  6. 0.0.1 28 Apr 2024

    Nothing published for this version

Every package, every release, already written down.

The archive is open and free. Watching your own project is what we are building next.

Browse the archive