C++ header-only

Open-source C++ projects categorized as header-only
CPP Cpp17 Cpp20 C++ Cpp11

Top 23 C++ header-only Projects

header-only
  1. json

    JSON for Modern C++

  2. SaaSHub

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

    SaaSHub logo
  3. spdlog

    Fast C++ logging library.

    Project mention: Show HN: Logfmtxx – Header only C++23 structured logging library using logfmt | news.ycombinator.com | 2024-04-03

    Why a new lib instead of using or contributing to an existing one as spdlog?

    https://github.com/gabime/spdlog

  4. cpp-httplib

    A C++ header-only HTTP/HTTPS server and client library

  5. entt

    Gaming meets modern C++ - a fast and reliable entity component system (ECS) and much more

    Project mention: Using Jolt with flecs & Dear ImGui: Game Physics Introspection | dev.to | 2024-04-17

    EnTT is a popular alternative to flecs for C++, which has different performance/memory characteristics.

  6. GLM

    OpenGL Mathematics (GLM)

    Project mention: Updates to H-1B | news.ycombinator.com | 2024-12-19

    Closest thing I've heard:

    https://github.com/g-truc/glm?tab=License-1-ov-file#readme

  7. FTXUI

    Features: - Functional style. Inspired by [1] and React - Simple and elegant syntax (in my opinion). - Support for UTF8 and fullwidth chars (→ 测试). - No dependencies. - Cross platform. Linux/mac (main target), Windows (experimental thanks to contributors), - WebAssembly. - Keyboard & mouse navigation. Operating systems: - linux emscripten - linux gcc - linux clang - windows msvc - mac clang

    Project mention: libaloo (Aloo) | dev.to | 2024-09-27

    libaloo is a C library which uses GTK4 behind the scenes to create an GTK application It’s mainly written in C. It also has a CLI and CLI with TUI written in C++ with FtxUI but to set it up, Python is used.

  8. Crow

    Crow is very fast and easy to use C++ micro web framework (inspired by Python Flask)

  9. GuiLite

    ✔️The smallest header-only GUI library(4 KLOC) for all platforms

  10. doctest

    The fastest feature-rich C++11/14/17/20/23 single-header testing framework

    Project mention: The Two Factions of C++ | news.ycombinator.com | 2024-11-24

    catch2 has become fairly bloated. doctest takes all of the best parts of catch2 without all the bloat and the end result is a test framework that is literally over 10x faster than catch2. It's also like 90% compatible with catch2 so porting your tests to it is pretty easy.

    Especially if you have a build process that always runs your unit tests, it's nice to have a very fast test/compile/debug loop.

    https://github.com/doctest/doctest

  11. Magic Enum C++

    Static reflection for enums (to string, from string, iteration) for modern C++, work with any enum type without any macro or boilerplate code

  12. Crow

    A Fast and Easy to use microframework for the web. (by CrowCpp)

  13. compile-time-regular-expressions

    Compile Time Regular Expression in C++

    Project mention: Implementing Regular Expressions in TypeScript Types (Badly) | news.ycombinator.com | 2024-10-20

    Hana Dusikova did this in C++ several years ago, with her CTRE library.

    https://github.com/hanickadot/compile-time-regular-expressio...

    Of course, it has all the usual tradeoffs of compile-time template programming.

  14. indicators

    Activity Indicators for Modern C++

  15. argparse

    Argument Parser for Modern C++

  16. proxy

    Proxy: Next Generation Polymorphism in C++ (by microsoft)

  17. plog

    Portable, simple and extensible C++ logging library

    Project mention: C++ Game Utility Libraries: for Game Dev Rustaceans | dev.to | 2024-03-13

    Alternatives are glog from Google is full-featured, like spdlog, while Plog offers a lightweight alternative. Both are worthy upgrades on using C++ built-in std::clog.

  18. FunctionalPlus

    Functional Programming Library for C++. Write concise and readable C++ code.

  19. Nameof C++

    Nameof operator for modern C++, simply obtain the name of a variable, type, function, macro, and enum

  20. palanteer

    Visual Python and C++ nanosecond profiler, logger, tests enabler

  21. cppzmq

    Header-only C++ binding for libzmq

  22. PEGTL

    Parsing Expression Grammar Template Library

  23. uvw

    Header-only, event based, tiny and easy to use libuv wrapper in modern C++ - now available as also shared/static library!

  24. mio

    Cross-platform C++11 header-only library for memory mapped file IO (by vimpunk)

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++ header-only discussion

Log in or Post with

C++ header-only related posts

  • Implementing Regular Expressions in TypeScript Types (Badly)

    3 projects | news.ycombinator.com | 20 Oct 2024
  • libaloo (Aloo)

    1 project | dev.to | 27 Sep 2024
  • Giving C++ std:regex a C makeover

    4 projects | news.ycombinator.com | 5 Sep 2024
  • 🚀Announcing conjure_enum - a C++20 enum and typename reflection Library

    1 project | dev.to | 31 Jul 2024
  • Show HN: Conjure_enum – a C++20 enum and typename reflection Library

    1 project | news.ycombinator.com | 30 Jul 2024
  • Larena: Yet another simple header only arena allocator for C

    1 project | news.ycombinator.com | 13 Jul 2024
  • Larena: Yet another simple header only arena allocator for C11

    1 project | news.ycombinator.com | 6 Jul 2024
  • A note from our sponsor - SaaSHub
    www.saashub.com | 16 Jan 2025
    SaaSHub helps you find the best software and product alternatives Learn more →

Index

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

# Project Stars
1 json 44,078
2 spdlog 25,075
3 cpp-httplib 13,429
4 entt 10,449
5 GLM 9,511
6 FTXUI 7,591
7 Crow 7,528
8 GuiLite 7,426
9 doctest 6,060
10 Magic Enum C++ 5,116
11 Crow 3,489
12 compile-time-regular-expressions 3,437
13 indicators 3,062
14 argparse 2,851
15 proxy 2,373
16 plog 2,256
17 FunctionalPlus 2,154
18 Nameof C++ 2,116
19 palanteer 2,110
20 cppzmq 2,016
21 PEGTL 1,967
22 uvw 1,893
23 mio 1,740

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