libfyaml is a C library for YAML 1.2 parsing and emission.
I have been working on it for several years as a parser/emitter library, and this alpha is the point where three additional interfaces are being released as public parts of the project.
Part of the motivation for the work is that I think modern C libraries can offer more ergonomic APIs than is often assumed, if they actually use modern C features. C99 is old at this
point, and using C11 and newer C2x-era features makes it possible to build interfaces that are still plain C, but are easier to use. You can do tThings like functional-flavored, Python-like data handling and typed serialization based on reflection.
What is new in 1.0.0-alpha1:
- a generic runtime for working with YAML values in C via fy_generic
- a reflection subsystem for YAML to C and C to YAML serialization based on C type metadata
- Python bindings built on the same generic model
- and of course the yaml 1.2 conformant solid core API on top of which all is built upon.
The release also adds the corresponding documentation, examples, tests, and Python wheel packaging.
If you want to try it, the repository includes build instructions for CMake, plus runnable examples for core parsing, generic transforms, parallel generic operations, and reflection-based typed serialization.
The feedback I'm looking for if for a better way to present the generic API or the reflection workflow.