C++ single-header-lib

Open-source C++ projects categorized as single-header-lib

Top 12 C++ single-header-lib Projects

single-header-lib
  1. webview

    Tiny cross-platform webview library for C/C++. Uses WebKit (GTK/Cocoa) and Edge WebView2 (Windows).

    Project mention: Webview – cross-platform HTML5 UI abstraction layer | news.ycombinator.com | 2026-06-16
  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. indicators

    Activity Indicators for Modern C++

  4. tabulate

    Table Maker for Modern C++ (by p-ranav)

  5. cr

    cr.h: A Simple C Hot Reload Header-only Library

    Project mention: Making Video Games in 2025 (without an engine) | news.ycombinator.com | 2026-03-02

    I see `dotnet watch` being mentioned for code hot reload which is such a great feature for quickly iterating on a game. Not having to restart the whole game just because one has changed a few if statements and values really helps staying in the flow.

    But I'm still not too enthusiastic about having GC in C# which is why ideally I'd like to start making a small 2D game just with SDL3 and C++ but how could I get this nice hot reload workflow there? I don't have the money to pay for expensive proprietary tools like https://liveplusplus.tech so what can I do? I guess there's the "game as dynamic library" trick from Handmade Hero (see https://www.youtube.com/shorts/seWAIURXxH0) so maybe that would work good enough? Maybe https://github.com/fungos/cr would do most of what's needed here?

    Also, how does one even do modern C++ these days? Is it possible to have big C++ code bases that still compile fast these days? Is CMake 4 good™ now? Are modules really there yet? I rely on clangd as LSP for working with C++ but I read that clangd still fundamentally struggles with C++ modules https://chuanqixu9.github.io/c++/2025/12/03/Clangd-support-f... and it's so bad that there has even been some effort going into making a new C++ LSP https://github.com/clice-io/clice

  6. nanobench

    Simple, fast, accurate single-header microbenchmarking functionality for C++11/14/17/20

  7. icecream-cpp

    🍦 Never use cout/printf to debug again

  8. matchit.cpp

    match(it): A lightweight single-header pattern-matching library for C++17 with macro-free APIs.

  9. csv2

    Fast CSV parser and writer for Modern C++

  10. structopt

    Parse command line arguments by defining a struct (by p-ranav)

  11. imgui_entt_entity_editor

    A drop-in entity editor for EnTT with Dear ImGui

  12. rapidobj

    A fast, header-only, C++17 library for parsing Wavefront .obj files.

  13. Heady

    A utility for creating amalgamated single-header C++ libraries

NOTE: The open source projects on this list are ordered by number of github stars. The number of mentions indicates repo mentiontions in the last 12 Months or since we started tracking (Dec 2020).

C++ single-header-lib discussion

Log in or Post with

C++ single-header-lib related posts

  • Webview – cross-platform HTML5 UI abstraction layer

    1 project | news.ycombinator.com | 16 Jun 2026
  • Ported my C game to WASM, here's everybug that I hit

    1 project | news.ycombinator.com | 15 Jun 2026
  • Much Faster than std::string, fmt::format, std::to_chars, std::time and more?

    1 project | /r/cpp | 6 Oct 2022
  • C++20 std::format is 2x slower than std::fstream?

    13 projects | /r/cpp_questions | 19 Nov 2021
  • Nanobench: Fast, single-header microbenchmarking functionality for C++

    1 project | news.ycombinator.com | 9 Nov 2021
  • Shocked by the size of std::bitset

    4 projects | /r/cpp | 31 May 2021
  • GUI heavy games - what are my options

    8 projects | /r/gamedev | 30 Apr 2021
  • A note from our sponsor - SaaSHub
    www.saashub.com | 18 Jun 2026
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

What are some of the best open-source single-header-lib projects in C++? This list will help you:

# Project Stars
1 webview 14,105
2 indicators 3,391
3 tabulate 2,163
4 cr 1,747
5 nanobench 1,680
6 icecream-cpp 744
7 matchit.cpp 644
8 csv2 619
9 structopt 507
10 imgui_entt_entity_editor 272
11 rapidobj 219
12 Heady 63

Sponsored
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com

Did you know that C++ is
the 7th most popular programming language
based on number of references?