Skip to content

Add ryaml as optional YAML parser dependency #2785

@koxudaxi

Description

@koxudaxi

Summary

ryaml is a Rust-based YAML parser that offers better performance than PyYAML. Development has resumed with a comprehensive roadmap (see ryaml#10). Once the next version is released, we should consider adding it as an optional dependency.

Background

  • ryaml is a Rust-based YAML parser with potential performance benefits
  • Development was on hiatus but has now resumed
  • Planned improvements include:
    • Python 3.13+ and free-threading support
    • Migration to actively maintained YAML parser (Saphyr)
    • Broader platform support via cibuildwheel
    • YAML spec conformance testing

Proposal

Once a stable release is available:

  1. Add ryaml as an optional dependency in pyproject.toml
    [project.optional-dependencies]
    ryaml = ["ryaml>=X.Y.Z"]
    
  2. Implement runtime detection to use ryaml when available, falling back to PyYAML
  3. Benchmark performance improvements for large schema files

Blocked By

  • Next stable release of ryaml with the roadmap improvements

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions