C++ single-header

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

Top 19 C++ single-header Projects

single-header
  1. indicators

    Activity Indicators for Modern C++

  2. 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.

    Stream logo
  3. proxy

    Proxy: Next Generation Polymorphism in C++

    Project mention: Common Rust Lifetime Misconceptions | news.ycombinator.com | 2025-12-14

    > 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

  4. tabulate

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

  5. cr

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

  6. nanobench

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

  7. watcher

    Filesystem watcher. Works anywhere. Simple, efficient and friendly. (by e-dant)

  8. matchit.cpp

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

  9. 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.

    InfluxDB logo
  10. csv2

    Fast CSV parser and writer for Modern C++

  11. leaf

    Lightweight Error Augmentation Framework (by boostorg)

  12. itoa

    Fast integer to ascii / integer to string conversion

  13. 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.

  14. meta.hpp

    C++20 Dynamic Reflection Library

  15. fkYAML

    A C++ header-only YAML library

  16. ramen

    Real-time Actor-based Message Exchange Network 🍜

    Project mention: Dataflow programming on an MCU in C++: tiny pubsub library for DSP and controls | news.ycombinator.com | 2025-03-25
  17. Heady

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

  18. curl4cpp

    Single header cURL wrapper for C++ around libcURL

  19. iface

    Anonymous, non-intrusive interfaces in C++

  20. command

    Command, ::process::Command like syscalls in C++. (by ferhatgec)

  21. EventSystem

    a single header event system that im using in my game

  22. SaaSHub

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

    SaaSHub logo
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 discussion

C++ single-header related posts

  • how do you properly benchmark?

    2 projects | /r/cpp | 20 Feb 2023
  • Much Faster than std::string, fmt::format, std::to_chars, std::time and more?

    1 project | /r/cpp | 6 Oct 2022
  • I don’t know which container to use (and at this point I’m too afraid to ask)

    2 projects | /r/cpp | 3 Feb 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
  • Curl4cpp – single header C++ cURL wrapper around libcURL

    1 project | news.ycombinator.com | 1 Aug 2021
  • curl4cpp - single header c++ cURL wrapper around libcURL

    1 project | /r/linux | 31 Jul 2021
  • A note from our sponsor - SaaSHub
    www.saashub.com | 22 Dec 2025
    SaaSHub helps you find the best software and product alternatives Learn more →

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

Sponsored
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.
getstream.io

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