oneyaml-syntax 0.1.0

Lossless YAML 1.2 decoder, parser, event stream, and syntax tree underneath oneyaml.
Documentation
  • Coverage
  • 100%
    357 out of 357 items documented3 out of 113 items with examples
  • Size
  • Source code size: 1.8 MB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 7.8 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • hclewk
oneyaml-syntax-0.1.0 has been yanked.

oneyaml-syntax

The lossless syntax layer of oneyaml: the UTF-8/16/32 decoder, the explicit-stack YAML 1.2.2 parser, its public lossless event stream, and the arena syntax tree whose untouched emit is byte-identical to the input.

For tooling (formatters, language servers, linters). This crate has its own semver track and may break more often than oneyaml; most users want oneyaml's Document instead.

Editing. SyntaxTree has structural edits (remove, replace, insert_before/insert_after, append_child, replace_token, and the line-end forms replace_to_line_end/insert_line_after) that splice Fragments parsed by the same parser. Each edit is checked in its real context and refused with a TreeEditError (the tree unchanged) when its text would read back as a different tree, so an edited tree always equals the parse of its own emit(). NodeId handles stay valid across edits until their element is removed (StaleNode after), edits cost O(depth + local), never O(document), and fork() copies a tree so that every handle issued before the fork resolves in both copies.

No unsafe, no panics on any input, and no recursion on the input-driven path. Its yaml-test-suite results are in docs/conformance.md.

MSRV: Rust 1.85 (rolling policy in the oneyaml README). License: MIT OR Apache-2.0.