whatisgithub

What is yaml-cpp?

jbeder/yaml-cpp — explained in plain English

Analysis updated 2026-06-26

5,919C++Audience · developerComplexity · 2/5Setup · moderate

In one sentence

yaml-cpp is a C++ library for reading and writing YAML configuration files following the YAML 1.2 standard, integrating into CMake projects with a single FetchContent call.

Mindmap

mindmap
  root((yaml-cpp))
    What it does
      Reads YAML files
      Writes YAML files
      YAML 1.2 standard
    Tech stack
      C++
      CMake
      FetchContent
    Use cases
      Config file loading
      Data serialization
      Cross-platform builds
    Audience
      C++ developers
      CMake project owners
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Load a YAML configuration file in a C++ application and access its values as structured data at runtime

USE CASE 2

Write structured data from a C++ program out to a properly formatted YAML file using the emit API

USE CASE 3

Add yaml-cpp to a CMake project via FetchContent so it downloads and links automatically without any manual install steps

What is it built with?

C++CMake

How does it compare?

jbeder/yaml-cppalexandrerouma/sdrplusplusgoogle/perfetto
Stars5,9195,9205,920
LanguageC++C++C++
Setup difficultymoderatemoderatemoderate
Complexity2/53/54/5
Audiencedevelopergeneraldeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a CMake-based build setup, community wrappers for Qt and Unreal Engine are maintained separately and not officially supported.

No specific license is mentioned in the description.

So what is it?

yaml-cpp is a library for C++ programs that need to read or write YAML files. YAML is a text format commonly used for configuration files, where data is organized using indentation and simple punctuation rather than XML tags or JSON brackets. This library lets C++ code load a YAML file and work with its contents as structured data, or take data from a C++ program and write it out as a properly formatted YAML file. The project follows the YAML 1.2 specification, which is the current official standard for the format. Developers integrate it into their own C++ projects using CMake, a widely used build tool that works across Windows, macOS, and Linux. The library can be built as a static library (bundled directly into the application) or as a shared library (loaded separately at runtime), depending on the needs of the project. Adding yaml-cpp to a CMake-based project can be done with CMake's FetchContent feature, which automatically downloads and links the library during the build process without requiring manual installation steps. The README points to a tutorial and a separate guide for emitting (writing out) YAML for anyone who wants to learn how to use the API. The project has a current API (version 0.5.0 and above) and an older API (version 0.3.x) that is still available but will stop receiving bug fixes in 2026. Community integrations exist for Qt and Unreal Engine, though those are maintained separately and not officially supported by this project.

Copy-paste prompts

Prompt 1
Using yaml-cpp, show me how to load a YAML config file in C++ and read a nested key called database.host
Prompt 2
How do I add yaml-cpp to my CMake project using FetchContent without installing it system-wide?
Prompt 3
Show me how to serialize a C++ struct to a YAML file using the yaml-cpp emitter API

Frequently asked questions

What is yaml-cpp?

yaml-cpp is a C++ library for reading and writing YAML configuration files following the YAML 1.2 standard, integrating into CMake projects with a single FetchContent call.

What language is yaml-cpp written in?

Mainly C++. The stack also includes C++, CMake.

What license does yaml-cpp use?

No specific license is mentioned in the description.

How hard is yaml-cpp to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is yaml-cpp for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.