subset of YAML spec that parses much quicker.
- Rust 92.5%
- Python 7.5%
|
|
||
|---|---|---|
| .forgejo/workflows | ||
| benches | ||
| examples | ||
| python | ||
| src | ||
| tests | ||
| .gitignore | ||
| Cargo.toml | ||
| LICENSE | ||
| perf_test.py | ||
| pyproject.toml | ||
| README.md | ||
| spec.md | ||
rapidYAML
Subset of YAML 1.2 built for parsing speed.
Implements a Rust parser with Rust and Python bindings.
Supports block maps, block sequences, and scalar types. Doesn't support i.e. anchors, flow collections, escape sequences.
Valid rapidYAML is guaranteed to be valid YAML.
Numbers
| Profile | rapidyaml (Python) | PyYAML CLoader |
|---|---|---|
| Flat sequence | 10.7M lines/s | 344k lines/s |
| Deep tree | 3.6M lines/s | 99k lines/s |
Usage
Python
import rapidyaml
obj = rapidyaml.load(text) # → dict / list / str / int / float / bool / None
Rust
let value = rapidyaml::parse(input)?;
Status
Early. Base feature set works. Flow collections, multiline strings, and YAML 1.1 compatibility are opt-in features on the roadmap.