Open-source projects categorized as header-only | Edit details
Related topics: #CPP #Cpp17 #Cpp11 #C++ #Cpp20

Top 23 header-only Open-Source Projects

  • json

    JSON for Modern C++

    Project mention: How to mock/test a DLL? | reddit.com/r/learncpp | 2022-05-13

    Since the original DLL returns the Data with structure pointers (some big structures), implementing it on JS was over complicated since JS doesn't have that native functionality. For that reason, my team decided to create an intermediate DLL written in C++ (or actually a superset of C since we dont use classes or advanced C++, only strings, arrays, maps). The final solution is NodeJS->CustomDLL->Manufacturer DLL. That way, our custom DLL manages all the structure/memory and returns simple json to be interpreted by nodejs

  • spdlog

    Fast C++ logging library.

    Project mention: spdlog version 1.10.0 | reddit.com/r/cpp | 2022-04-04
  • SonarLint

    Deliver Cleaner and Safer Code - Right in Your IDE of Choice!. SonarLint is a free and open source IDE extension that identifies and catches bugs and vulnerabilities as you code, directly in the IDE. Install from your favorite IDE marketplace today.

  • cpp-httplib

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

    Project mention: Networking TS: first impression and questions; | reddit.com/r/cpp | 2022-04-09
  • Crow

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

    Project mention: C++ Best Uses | reddit.com/r/cpp | 2022-05-17

    A web server e.g. https://github.com/ipkn/crow

  • entt

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

    Project mention: Building Games in ECS with Entity Relationships | reddit.com/r/programming | 2022-04-27

    So, why use this when entt https://github.com/skypjack/entt already exists ?

  • GLM

    OpenGL Mathematics (GLM)

    Project mention: Memory layout of struct vs array | reddit.com/r/cpp | 2022-05-07

    It is not guaranteed that the memory layout will be the same but the assumption is often made anyway. From what I recall, this is how the widely used GLM math library iterates over the members of vectors and matrices.

  • GuiLite

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

    Project mention: Does anyone have feedback on working with GuiLite? | reddit.com/r/cpp_questions | 2022-04-08
  • Scout APM

    Less time debugging, more time building. Scout APM allows you to find and fix performance issues with no hassle. Now with error monitoring and external services monitoring, Scout is a developer's best friend when it comes to application development.

  • doctest

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

    Project mention: Testing framework Catch2 3.0 final released | reddit.com/r/cpp | 2022-05-17

    Keep in mind https://github.com/doctest/doctest/issues/554. Also, doctest lacks: - Matchers - Data generators - Benchmarking - ...


    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: How do i display things in c++? | reddit.com/r/cpp_questions | 2022-05-11

    Another possibility I quite like is ftxui (https://github.com/ArthurSonzogni/FTXUI). It's a terminal graphics library. It's also cross platform, maybe a tad less intuitive though.

  • 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

    Project mention: Nameof: Simply Obtain The Name Of A C++ Variable, Type, Function, Or Macro | reddit.com/r/cpp | 2022-05-11

    He is also super reactive. I once submitted an issue about a compiler related bug in magic_enum, which he solved in 30 minutes.

  • compile-time-regular-expressions

    Compile Time Regular Expression in C++

    Project mention: conanex - Conan Extended | reddit.com/r/cpp | 2022-04-26

    For example, it allow to install the following packages that could have conanfile.py on github: `` [requires] poco/1.9.4 flatbuffers/2.0.0 { git = "https://github.com/google/flatbuffers", tag = "v2.0.0" } CTRE/3.6 { git = "https://github.com/hanickadot/compile-time-regular-expressions" }

  • indicators

    Activity Indicators for Modern C++

    Project mention: Libraries | reddit.com/r/cpp_questions | 2021-12-07


  • awesome-hpp

    A curated list of awesome header-only C++ libraries

    Project mention: oof: real-time, full-color console output for C++ | reddit.com/r/programming | 2021-11-22

    I sampled ten arbitrary projects from https://github.com/p-ranav/awesome-hpp, and not one of them used this pattern. Maybe it's more common in some circles than others?

  • FunctionalPlus

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

    Project mention: C++20 Ranges The Key Advantage - Algorithm Composition | reddit.com/r/cpp | 2022-03-28

    I use a library called FunctionalPlus daily.


    Parsing Expression Grammar Template Library

    Project mention: TIL: Visual Studio has quantum state values 🤨 | reddit.com/r/cpp | 2022-03-17

    The program in the post was just an example meant to illustrate the problem. Originally, this (new) behavior of MSVC broke my code in the PEGTL, see [this commit](https://github.com/taocpp/PEGTL/commit/e3c8cb499dc3d1d76d23f2d5d79469dcb15550c5) that I needed to apply to fix it.

  • uvw

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

    Project mention: I hate ASIO and I can't be alone. | reddit.com/r/cpp | 2021-08-14

    Have you tried this wrapper? https://github.com/skypjack/uvw

  • plog

    Portable, simple and extensible C++ logging library

    Project mention: Logger design | reddit.com/r/cpp_questions | 2022-02-11

    From the usability and features I like plog a lot. Their code is on Github, maybe check how they've done it? You can also look at other libraries to get a feeling for different approaches.

  • hana

    Your standard library for metaprogramming

  • Nameof C++

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

    Project mention: Nameof: Simply Obtain The Name Of A C++ Variable, Type, Function, Or Macro | reddit.com/r/cpp | 2022-05-11
  • cppzmq

    Header-only C++ binding for libzmq

    Project mention: Any good lightweight c++ local socket library for embedded Linux? | reddit.com/r/cpp_questions | 2022-05-10

    Maybe I am not understanding it correctly, the https://github.com/zeromq/libzmq is GPL v3, and header only file is https://github.com/zeromq/cppzmq MIT license? So I can use the header only library and I don't need to open source my code?

  • mio

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

  • Better Enums

    C++ compile-time enum to string, iteration, in a single header file

  • argparse

    Argument Parser for Modern C++

    Project mention: Looking for some small rust projects with an elegant code base that I can study. | reddit.com/r/rust | 2022-03-16

    argparse is another good one. Templated (delicious), tested, AND has conan and debian package deployment.

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). The latest post mention was on 2022-05-17.

header-only related posts


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

Project Stars
1 json 30,149
2 spdlog 14,591
3 cpp-httplib 6,995
4 Crow 6,784
5 entt 6,722
6 GLM 6,325
7 GuiLite 6,185
8 doctest 3,873
9 FTXUI 3,037
10 Magic Enum C++ 2,753
11 compile-time-regular-expressions 2,350
12 indicators 2,015
13 awesome-hpp 1,840
14 FunctionalPlus 1,622
15 PEGTL 1,529
16 uvw 1,437
17 plog 1,386
18 hana 1,376
19 Nameof C++ 1,361
20 cppzmq 1,330
21 mio 1,296
22 Better Enums 1,267
23 argparse 1,151
Find remote jobs at our new job board 99remotejobs.com. There are 7 new remote jobs listed recently.
Are you hiring? Post a new remote job listing for free.
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives