libcyaml with meson and patches for zrythm
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Alexandros Theodotou 007bca9536
merge changes from upstream master
2 years ago
docs initial commit 3 years ago
examples initial commit 3 years ago
include/cyaml update to 1.1.0 3 years ago
src merge changes from upstream master 2 years ago
test update to 1.1.0 3 years ago
.gitignore initial commit 3 years ago update to 1.1.0 3 years ago
LICENSE initial commit 3 years ago
Makefile update to 1.1.0 3 years ago initial commit 3 years ago initial commit 3 years ago use 99 version 2 years ago

LibCYAML: Schema-based YAML parsing and serialisation

Build Status Code Coverage Code Quality

LibCYAML is a C library for reading and writing structured YAML documents. It is written in ISO C11 and licensed under the ISC licence.


The fundamental idea behind CYAML is to allow applications to construct schemas which describe both the permissible structure of the YAML documents to read/write, and the C data structure(s) in which the loaded data is arranged in memory.


  • Make it easy to load YAML into client's custom C data structures.
  • Good compromise between flexibility and simplicity.


  • Load, Save and Free functions.
  • Reads and writes arbitrary client data structures.
  • Schema-driven, allowing control over permitted YAML, for example:
    • Required / optional mapping fields.
    • Allowed / disallowed values.
    • Minimum / maximum sequence entry count.
    • etc...
  • Enumerations and flag words.
  • YAML backtraces make it simple for users to fix their YAML to conform to your schema.
  • Uses standard libyaml library for low-level YAML read / write.
  • Support for YAML aliases and anchors.


To build the library, run:


You can control the optimisation and building of asserts by setting the build variant:

make VARIANT=debug
make VARIANT=release

Another debug build variant which is built with address sanitiser (incompatible with valgrind) can be built with:

make VARIANT=san


To install a release version of the library, run:

make install VARIANT=release

It will install to the PREFIX /usr/local by default, and it will use DESTDIR and PREFIX from the environment if set.


To run the tests, run any of the following, which generate various levels of output verbosity (optionally setting VARIANT=release, or VARIANT=san):

make test
make test-quiet
make test-verbose
make test-debug

To run the tests under valgrind, a similar set of targets is available:

make valgrind
make valgrind-quiet
make valgrind-verbose
make valgrind-debug

To generate a test coverage report, gcovr is required:

make coverage


To generate both public API documentation, and documentation of CYAML's internals, doxygen is required:

make docs

Alternatively, the read the API documentation directly from the cyaml.h header file.

There is also a tutorial.


In addition to the documentation, you can study the examples.