oxc-project/oxc-yaml-parser — explained in plain English
Analysis updated 2026-05-18
Build a YAML code formatter that needs to preserve comments and original formatting.
Parse YAML files into a structured tree for further programmatic processing.
Detect YAML syntax errors with exact source locations.
| oxc-project/oxc-yaml-parser | aloxaf/leetcode_prelude | badbread/crumbvms | |
|---|---|---|---|
| Stars | 14 | 14 | 14 |
| Language | Rust | Rust | Rust |
| Last pushed | — | 2023-11-11 | — |
| Maintenance | — | Dormant | — |
| Setup difficulty | easy | easy | hard |
| Complexity | 3/5 | 2/5 | 4/5 |
| Audience | developer | developer | ops devops |
Figures from each repo's GitHub metadata at analysis time.
oxc-yaml-parser is a small building block library, written in Rust, that reads YAML files, a common configuration file format, and turns them into a structured representation a computer program can work with. It is meant specifically for developers building tools that need to rewrite or reformat YAML files while keeping the original formatting details intact. Most parsers that read YAML throw away small details like comments and exact spacing once they understand the meaning of the file. This one is built differently: it keeps comments attached to the structure with their exact position in the original text, and it does not convert values like numbers or dates into their final form, instead pointing back to the exact original text for each value. This matters for a tool like a code formatter, which needs to reproduce the file's original content faithfully rather than just its meaning. The project deliberately does not try to resolve more advanced YAML features like schemas, tags, or reference shortcuts within a file, focusing only on reading the raw structure correctly. If the input YAML has a syntax error, the parser stops immediately and reports exactly where the problem is, rather than returning a partial or guessed result. To check that it works correctly, the project runs its parser against three separate sets of test YAML files, including an official YAML test suite and fixtures used by the popular Prettier code formatter, and stores the results so any changes in behavior can be reviewed. The README states that all valid YAML in these test sets currently parses successfully. The project is part of the oxc family of Rust based JavaScript and web tooling projects, and it is licensed under the MIT license, with some of its internal scanning logic derived from an existing open source YAML scanning library.
A Rust library that parses YAML files into a structured form while preserving comments and exact formatting, built for making formatters.
Mainly Rust. The stack also includes Rust.
Setup difficulty is rated easy, with roughly 30min to a first successful run.
Mainly developer.
This repo across BitVibe Labs
Verify against the repo before relying on details.