Skip to main content

Rapid YAML - a library to parse and emit YAML, and do it fast

Project description

Rapid YAML

MIT Licensed release PyPI Docs Gitter

test Coveralls Codecov Total alerts Language grade: C/C++

Or ryml, for short. ryml is a C++ library to parse and emit YAML, and do it fast, on everything from x64 to bare-metal chips without operating system. (If you are looking to use your programs with a YAML tree as a configuration tree with override facilities, take a look at c4conf).

ryml parses both read-only and in-situ source buffers; the resulting data nodes hold only views to sub-ranges of the source buffer. No string copies or duplications are done, and no virtual functions are used. The data tree is a flat index-based structure stored in a single array. Serialization happens only at your direct request, after parsing / before emitting. Internally, the data tree representation stores only string views and has no knowledge of types, but of course, every node can have a YAML type tag. ryml makes it easy and fast to read and modify the data tree.

ryml is available as a single header file, or it can be used as a simple library with cmake -- both separately (ie build->install->find_package()) or together with your project (ie with add_subdirectory()). (See below for examples).

ryml can use custom global and per-tree memory allocators and error handler callbacks, and is exception-agnostic. ryml provides a default implementation for the allocator (using std::malloc()) and error handlers (using using std::abort() is provided, but you can opt out and provide your own memory allocation and eg, exception-throwing callbacks.

ryml does not depend on the STL, ie, it does not use any std container as part of its data structures), but it can serialize and deserialize these containers into the data tree, with the use of optional headers. ryml ships with c4core a small C++ utilities multiplatform library.

ryml is written in C++11, and compiles cleanly with:

  • Visual Studio 2015 and later
  • clang++ 3.9 and later
  • g++ 4.8 and later
  • Intel Compiler

ryml is extensively unit-tested in Linux, Windows and MacOS. The tests cover x64, x86, wasm (emscripten), arm, aarch64, ppc64le and s390x architectures, and include analysing ryml with:

  • valgrind
  • clang-tidy
  • clang sanitizers:
    • memory
    • address
    • undefined behavior
    • thread
  • LGTM.com

ryml also runs in bare-metal, and RISC-V architectures. Both of these are pending implementation of CI actions for continuous validation, but ryml has been proven to work there.

ryml is available in Python, and can very easily be compiled to JavaScript through emscripten (see below).

See also the changelog and the roadmap.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

rapidyaml-0.4.1-cp39-cp39-win_amd64.whl (140.4 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

rapidyaml-0.4.1-cp39-cp39-win32.whl (111.2 kB view hashes)

Uploaded CPython 3.9 Windows x86

rapidyaml-0.4.1-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (174.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

rapidyaml-0.4.1-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (184.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

rapidyaml-0.4.1-cp38-cp38-win_amd64.whl (139.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

rapidyaml-0.4.1-cp38-cp38-win32.whl (111.4 kB view hashes)

Uploaded CPython 3.8 Windows x86

rapidyaml-0.4.1-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (175.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

rapidyaml-0.4.1-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (185.1 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

rapidyaml-0.4.1-cp37-cp37m-win_amd64.whl (139.0 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

rapidyaml-0.4.1-cp37-cp37m-win32.whl (111.1 kB view hashes)

Uploaded CPython 3.7m Windows x86

rapidyaml-0.4.1-cp37-cp37m-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_12_x86_64.manylinux2010_x86_64.whl (174.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ x86-64 manylinux: glibc 2.5+ x86-64

rapidyaml-0.4.1-cp37-cp37m-manylinux_2_5_i686.manylinux1_i686.manylinux_2_12_i686.manylinux2010_i686.whl (185.1 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686 manylinux: glibc 2.5+ i686

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page