SaaSHub helps you find the best software and product alternatives Learn more →
Top 19 C++ single-header Projects
-
-
Stream
Stream - Scalable APIs for Chat, Feeds, Moderation, & Video. Stream helps developers build engaging apps that scale to millions with performant and flexible Chat, Feeds, Moderation, and Video APIs and SDKs powered by a global edge network and enterprise-grade infrastructure.
-
> I could imagine a world where templates are compiled separately and there is essentially duck typing built into the runtime.
The bit of my comment you quoted was just talking about definition checking. Separate compilation of templates is a distinct concern and would be an entirely new can of worms. I'm not sure if separate compilation of templates as they currently are is possible at all; at least off the top of my head there would need to be some kind of tradeoff/restriction added (opting into runtime polymorphism, restricting the types that can be used for instantiation, etc.).
I think both definition checking and separate compilation would be interesting to explore, but I suspect backwards compat and/or migration difficulties would make it hard, if not impossible, to add either feature to standard C++.
> For example, if the template parameter type is a concept, your type could be automatically hooked up as if it was just a normal class and you inherited from it.
Sounds a bit like `dyn Trait` from Rust or one of the myriad type erasure polymorphism libraries in C++ (Folly.Poly [0], Proxy [1], etc.). Not saying those are precisely on point, though; just thought some of the ideas were similar.
[0]: https://github.com/facebook/folly/blob/main/folly/docs/Poly....
[1]: https://github.com/microsoft/proxy
-
-
-
-
-
matchit.cpp
match(it): A lightweight single-header pattern-matching library for C++17 with macro-free APIs.
-
InfluxDB
InfluxDB – Built for High-Performance Time Series Workloads. InfluxDB 3 OSS is now GA. Transform, enrich, and act on time series data directly in the database. Automate critical tasks and eliminate the need to move data externally. Download now.
-
-
-
-
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.
-
-
- Project mention: Dataflow programming on an MCU in C++: tiny pubsub library for DSP and controls | news.ycombinator.com | 2025-03-25
-
-
-
-
-
-
SaaSHub
SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives
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 | 22 Dec 2025
Index
What are some of the best open-source single-header projects in C++? This list will help you:
| # | Project | Stars |
|---|---|---|
| 1 | indicators | 3,322 |
| 2 | proxy | 3,041 |
| 3 | tabulate | 2,122 |
| 4 | cr | 1,719 |
| 5 | nanobench | 1,604 |
| 6 | watcher | 772 |
| 7 | matchit.cpp | 632 |
| 8 | csv2 | 614 |
| 9 | leaf | 337 |
| 10 | itoa | 237 |
| 11 | x86RetSpoof | 175 |
| 12 | meta.hpp | 138 |
| 13 | fkYAML | 127 |
| 14 | ramen | 60 |
| 15 | Heady | 59 |
| 16 | curl4cpp | 13 |
| 17 | iface | 6 |
| 18 | command | 3 |
| 19 | EventSystem | 1 |