A fast C++ library for parsing and emitting YAML, designed for performance and low memory usage.
RapidYAML (ryml) is a C++ library for high-speed parsing and emitting of YAML data. It uses zero-copy string views and a flat, index-based tree structure to maximize performance and minimize memory overhead, making it suitable for environments ranging from x64 systems to bare-metal chips without an operating system.
C++ developers working in performance-critical or resource-constrained environments, such as embedded systems, game engines, or high-throughput applications that require efficient YAML or JSON processing.
Developers choose RapidYAML for its exceptional parsing speed—up to 150 MB/s for YAML and 450 MB/s for JSON—significantly outperforming alternatives like yaml-cpp, while offering control over memory allocation, STL independence, and cross-platform support.
Rapid YAML - a library to parse and emit YAML, and do it fast.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Parses YAML at ~150MB/s and JSON at ~450MB/s, significantly outperforming alternatives like yaml-cpp, as detailed in benchmark comparisons in the README.
Uses string views into the source buffer, eliminating unnecessary string duplications and reducing memory overhead, which is ideal for performance-critical applications.
Available as a single header file or CMake library, with support for custom memory allocators and error handlers, allowing fine-grained control in diverse environments.
Compiles with Visual Studio, clang++, g++, and Intel Compiler, and runs on multiple architectures including ARM, RISC-V, and WebAssembly, ensuring broad usability.
Deliberately ignores some YAML standard features like container map keys and %YAML directives, and is permissive with errors, which may not suit strict compliance needs.
Offers a two-level API with index-based and node-based access, which can be confusing and requires understanding of underlying flat tree structures, increasing the learning curve.
While a single header is available, full integration may require CMake and handling of submodules like c4core, adding complexity to project setup compared to simpler libraries.
rapidyaml is an open-source alternative to the following products: