SaaSHub helps you find the best software and product alternatives Learn more →
Top 20 C++ single-header Projects
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
-
-
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
-
-
Since there are comments below asking about benchmarks, others noting or expressing interest in other projects, I'll drop the one I made: https://github.com/e-dant/watcher
There are benchmarks in there, and comparisons with all the other watchers out there I could find at the time I made it (see "Comparison with Similar Projects" at the very bottom of the readme).
-
matchit.cpp
match(it): A lightweight single-header pattern-matching library for C++17 with macro-free APIs.
-
-
-
-
x86RetSpoof
Invoke functions with a spoofed return address. For 32-bit Windows binaries. Supports __fastcall, __thiscall, __stdcall and __cdecl calling conventions. Written in C++17.
-
-
-
-
-
Tachyon.JSON
Discontinued Tachyon JSON v6: The World's Fastest JSON Library. 5.5 GB/s throughput via AVX2 ASM kernels & Lazy Indexing. C++20 header-only, nlohmann-like syntax, 160x faster than standard DOM parsers. [GET https://api.github.com/repos/wilkolbrzym-coder/Tachyon.JSON: 404 - Not Found // See: https://docs.github.com/rest/repos/repos#get-a-repository]
Project mention: Show HN: Tachyon – A C++ JSON parser matching simdjson's throughput via AVX-512 | news.ycombinator.com | 2026-01-08 -
-
-
Project mention: Conex – single-header C++20 library for condition-based binary pattern matching | news.ycombinator.com | 2026-05-20
-
-
C++ single-header discussion
C++ single-header related posts
-
how do you properly benchmark?
-
Much Faster than std::string, fmt::format, std::to_chars, std::time and more?
-
I don’t know which container to use (and at this point I’m too afraid to ask)
-
C++20 std::format is 2x slower than std::fstream?
-
Nanobench: Fast, single-header microbenchmarking functionality for C++
-
Curl4cpp – single header C++ cURL wrapper around libcURL
-
curl4cpp - single header c++ cURL wrapper around libcURL
-
A note from our sponsor - SaaSHub
www.saashub.com | 12 Jun 2026
Index
What are some of the best open-source single-header projects in C++? This list will help you:
| # | Project | Stars |
|---|---|---|
| 1 | indicators | 3,391 |
| 2 | tabulate | 2,163 |
| 3 | cr | 1,747 |
| 4 | nanobench | 1,680 |
| 5 | watcher | 796 |
| 6 | matchit.cpp | 644 |
| 7 | csv2 | 619 |
| 8 | leaf | 339 |
| 9 | itoa | 245 |
| 10 | x86RetSpoof | 179 |
| 11 | fkYAML | 143 |
| 12 | meta.hpp | 139 |
| 13 | ramen | 73 |
| 14 | Heady | 63 |
| 15 | Tachyon.JSON | 13 |
| 16 | curl4cpp | 13 |
| 17 | iface | 6 |
| 18 | Conex | 3 |
| 19 | command | 3 |
| 20 | EventSystem | 1 |