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

Topics
#lists #cpp #list #cplusplus #cross-platform #libraries #modern-cpp #cpp14 #resources #cpp11 #header-only #awesome-list #cpp17 #cpp-library #cpp98 #single-#header-lib #single-header #cpp20 #cpp03 #header-library

Pranav adc437aedc Merge pull request #127 from sebsjames/dev/syntax 3 months ago
img c1ab686ee9 Added project logo 5 years ago
.travis.yml 1a65b155a0 Add travis ci for validating links 5 years ago
CONTRIBUTING.md 0a84570630 Update CONTRIBUTING.md 5 years ago
LICENSE d0e573b3fe Create LICENSE 5 years ago
README.md adc437aedc Merge pull request #127 from sebsjames/dev/syntax 3 months ago

README.md

Awesome header-only C++ libraries

Table of Contents

Argument Parsers

Library Stars Description License
Argh! GitHub stars Argh! A minimalist argument handler. License
argparse GitHub stars Argument Parser for Modern C++.
args GitHub stars A simple header-only C++ argument parser library.
cmd_line_parser GitHub stars Command line parser for C++17.
CLI11 GitHub stars CLI11 is a command line parser for C++11 and beyond. License
clipp GitHub stars Powerful & Expressive Argument Parsing for Modern C++.
cxxopts GitHub stars Lightweight C++ GNU style option parser library.
fire-hpp GitHub stars Create fully functional CLIs using function signatures. License
flags GitHub stars Simple, extensible, header-only C++17 argument parser.
structopt GitHub stars Parse command line arguments by defining a struct.

Audio

Library Stars Description License
miniaudio GitHub stars Audio playback and capture library written in C, in a single source file.
minimp3 GitHub stars Minimalistic MP3 decoder single header library.

Benchmarking

Library Stars Description License
criterion GitHub stars Microbenchmarking for Modern C++.
nanobench GitHub stars Simple, fast, accurate microbenchmarking for C++11.
picobench GitHub stars A small microbenchmarking library for C++11.

Communication

Library Stars Description License
comms GitHub stars Implement binary communication protocols in >=C++11.

Compression

Library Stars Description License
Gzip GitHub stars Gzip header-only C++ library. License
interpolative_coding GitHub stars Binary Interpolative Coding algorithm.
zstr GitHub stars A C++ header-only ZLib wrapper.

Concurrency

Library Stars Description License
cs_libguarded GitHub stars Multithreaded programming. License
taskflow GitHub stars Modern C++ Parallel Task Programming.
task_system GitHub stars Better Code: Concurrency - Sean Parent.
transwarp GitHub stars A header-only C++ library for task concurrency.
taskpool GitHub stars Modern C++ taskpool.
thread-pool GitHub stars Modern C++20 thread-pool.

Cryptography and Security

Library Stars Description License
cppcodec GitHub stars Encode/decode base64, base64url, base32, etc.
digestpp GitHub stars     C++11 header-only message digest library.
PicoSHA2 GitHub stars Header-file-only, SHA256 hash generator in C++.
plusaes GitHub stars Header only C++ AES cipher library. License
stduuid GitHub stars A C++17 cross-platform implementation for UUIDs.

Databases

Library Stars Description License
OTL Oracle, ODBC and DB2-CLI Template Library. OpenBSD

Data Formats

Library Stars Description License
bencode GitHub stars C++20 bencode library. License
Boost.JSON GitHub stars JSON parsing, serialization, inspection and modification. License
cpptoml GitHub stars Header-only library for parsing TOML.
csv2 GitHub stars Fast CSV parser and writer for Modern C++.
CSV Parser GitHub stars Reading, writing, and analyzing CSV files.
daw_json_link GitHub stars Static JSON parsing in C++. License
Fast C++ CSV Parser GitHub stars Fast library for reading CSV files. License
FlatJSON GitHub stars Extremely fast just one allocation and zero copy JSON parser. License
Glaze GitHub stars Extremely fast, in memory, JSON and interface library for modern C++.
inih GitHub stars This is a header only C++ version of inih. License
nlohmann/json GitHub stars JSON for Modern C++.
json_struct GitHub stars High performance, single header only to serialize and deserialize JSON to C++ structs.
jsoncons GitHub stars Construct JSON and JSON-like data formats. License
minicsv GitHub stars Bare minimal CSV stream based on C++ file streams.
picojson GitHub stars a header-file-only, JSON parser serializer in C++. License
pugixml GitHub stars           A C++ XML processing library with a DOM-like interface and XPath 1.0 support.
rapidcsv GitHub stars C++ CSV parser library. License
rapidjson GitHub stars A fast JSON parser/generator for C++.
rapidxml GitHub stars           RapidXML fork; XML namespacing, per-element parsing, etc. License
simdjson GitHub stars Parsing gigabytes of JSON per second. License
simpleini GitHub stars Read and write INI-style configuration files.
taocpp JSON GitHub stars C++ header-only JSON library.
toml11 GitHub stars TOML for Modern C++.
tomlplusplus GitHub stars TOML config file parser and serializer for >=C++17.
tortellini GitHub stars A really stupid INI file format for C++11.
valijson GitHub stars JSON Schema validation. License
xml2json GitHub stars A header-only C++ library converts XML to JSON.

Data Mining, Machine Learning, and Deep Learning

Library Stars Description License
dlib GitHub stars A toolkit for real-world machine learning and data analysis. License
frugally deep GitHub stars Use Keras models in C++.
gaenari GitHub stars Incremental decision tree in C++17. License
hnswlib GitHub stars Fast approximate nearest neighbors. License
MiniDNN GitHub stars A header-only C++ library for deep neural networks.
mlpack GitHub stars mlpack: a fast, header-only C++ machine learning library. License
nanoflann GitHub stars Nearest Neighbor (NN) search with KD-trees. License
tiny-dnn GitHub stars Dependency-free deep learning framework in C++14. License

Data Formatting and Presentation

Library Stars Description License
asap GitHub stars Creating, displaying, iterating and manipulating dates.
cxx prettyprint GitHub stars Pretty-printing of any container in C++(0x). License
emio GitHub stars A safe and fast high-level and low-level character input/output C++20 library.
fmt GitHub stars A modern formatting library.
pprint GitHub stars Pretty Printer for Modern C++.
strf GitHub stars A fast formatting library for C++14. License
tabulate GitHub stars Table Maker for Modern C++.

Data Querying

Library Stars Description License
boolinq GitHub stars Simplest C++ header-only LINQ template library.

Data Structures and Algorithms

Library Stars Description License
BitMagic GitHub stars Compressed bit-vectors, logical operations, memory compact containers. License
concurrent queue GitHub stars Fast multi-producer, multi-consumer lock-free concurrent queue. License License
dynamic bitset GitHub stars The C++17 header-only dynamic bitset.
frozen GitHub stars Constexpr alternative to gperf for C++14 users. License
hopscotch map GitHub stars           Fast hash map and hash set using hopscotch hashing.
immer GitHub stars Postmodern immutable and persistent data structures. License
MPMCQueue GitHub stars A bounded multi-producer multi-consumer concurrent queue.
outcome GitHub stars Lightweight outcome and result. License
parallel hashmap GitHub stars Very fast and memory-friendly hashmap and btree containers. License
PGM-index GitHub stars                 Blazing fast queries and updates over billions of items using orders of magnitude less memory than other containers. License
robin-hood hashing GitHub stars Fast & memory efficient hashtable based on robin hood hashing.
robin-map GitHub stars Fast hash map and hash set using robin hood hashing.
sfl-library GitHub stars Small vector. Small flat map/multimap/set/multiset (ordered and unordered). C++11.
small GitHub stars Implementations of the main STL containers optimized for the case when they are small.
tries GitHub stars Fast and highly customisable C++20 trie implementation.

Debugging

Library Stars Description License
backward-cpp GitHub stars A beautiful stack trace pretty printer for C++.

Deep Learning

Library Stars Description License
ceras GitHub stars A deep learning engine in C++20. License

Dependency Injection

Library Stars Description License
inversify-cpp GitHub stars C++17 inversion of control and dependency injection container library.

Event Handling Mechanisms

Library Stars Description License
eventbus GitHub stars Mediator pattern event bus for C++. License
eventpp GitHub stars Event Dispatcher and callback list for C++. License
periodic-function Github Starts Callbacks at a specified time interval.

File System

Library Stars Description License
simplebinstream GitHub stars C++ Simplistic Binary Stream.
filesystem GitHub stars Cross-platform implementation of std::filesystem for C++11/14/17.
glob GitHub stars Glob for C++17.
llfio GitHub stars P1031 low-Level file i/o and filesystem library. License
mio GitHub stars Cross-platform C++11 memory mapped file IO.
mm_file GitHub stars Memory-mapped files for C++.
tinydir GitHub stars       Lightweight, portable C directory and file reader. License

Functional Programming

Library Stars Description License
FunctionalPlus GitHub stars Functional Programming Library for C++. License
immer GitHub stars Persistent functional data structures in C++. License
lager GitHub stars Redux-like unidirectional data-flow for C++.
schmutz GitHub stars Easy Guile Scheme C++ bindings. License
zug GitHub stars Transducers (from Clojure) in C++. License

Geometry, Graphics Processing, and Game Development

Library Stars Description License
arcball_camera GitHub stars Immediate-mode camera for your graphics demos.
Brutus GitHub stars Marching cubes implementation.
cinolib GitHub stars Process polygonal and polyhedral meshes.
cr GitHub stars A Simple C Hot Reload Header-only Library.
CxxSwizzle GitHub stars Modern C++ swizzling header-only library.
earcut.hpp GitHub stars Fast Polygon triangulation.
entt GitHub stars Entity component system (ECS) and much more.
glm GitHub stars OpenGL Mathematics (GLM).
librg GitHub stars 🚀 Making multi-player gamedev simpler since 2017. License                  
micro-gl GitHub stars 👾 CPU Vector Graphics Engine (No FPU or std-lib needed).
nanort GitHub stars Modern ray tracing kernel.
px GitHub stars Thread Scheduling, Rendering, and so on.
Simple OpenGL Loader GitHub stars Extensible, cross-platform OpenGL loader.
Sokol GitHub stars Cross-platform libraries for C and C++.
stb GitHub stars Single-file public domain libraries.
Swarmz GitHub stars Swarming (flocking) library for real-time applications.
tiny-differentiable-simulator GitHub stars               Tiny Differentiable Simulator is a header-only C++ physics library with zero dependencies. License
tinygltf GitHub stars C++11 tiny glTF 2.0 library.
tweeny GitHub stars A modern C++ tweening library.
Vookoo GitHub stars Take the pain out of Vulkan.
voxelizer GitHub stars Header only mesh voxelizer in c99.

GPU

Library Stars Description License
thrust GitHub stars Parallel programming library. License                      
vuda GitHub stars                       Vulkan-based library that provides a CUDA Runtime API interface for writing GPU-accelerated applications.
muda GitHub stars Elegant kernel launch, debug-friendly memory accessor, automatic CudaGraph generation & updating for CUDA. License

Graph

Library Stars Description License
CXXGraph GitHub stars       Graph Representation and Algorithms Library >= C++17                               License          
Graaf GitHub stars A general-purpose lightweight C++20 graph library.

GUI

Library Stars Description License
Centurion GitHub stars A modern C++17/20 wrapper library for SDL2.
GuiLite GitHub stars The smallest header-only GUI library(5 KLOC) for all platforms. License
Nuklear GitHub stars Immediate mode cross-platform GUI library.
WinLamb GitHub stars C++11 native Win32 GUI library.

High-performance Computing

Library Stars Description License
MPL GitHub stars A C++11 message passing library based on the Message Passing Interface standard. License

HTTP and the Web

Library Stars Description License
cinatra GitHub stars Modern (c++17), Cross-platform Http Framework.
cpp-httplib GitHub stars A C++11 Cross platform HTTP/HTTPS library.
jwt-cpp GitHub stars Create and validate JSON web tokens.
RESTinio GitHub stars Asynchronous HTTP/WebSocket server C++14 library License
cuehttp GitHub stars Modern c++ middleware framework for http(http/https)/websocket(ws/wss). License
libfv GitHub stars libfv is C++20 header-only network library, support TCP/SSL/Http/websocket server and client
NetIF GitHub stars Cross-platform network interface addresses without name lookups in C++14. License

Image Processing

Library Stars Description License
BitmapPlusPlus GitHub stars Simple and Fast header only Bitmap (BMP) library.
CImg GitHub stars Cool Image, one file: full featured image processing.
color-util GitHub stars Colors, Color space converters for RGB, HSL, XYZ, Lab, etc.
color GitHub stars Color manipulation/conversion for different types and formats.
nanopm GitHub stars NanoPM, single header only PatchMatch.
noise2d GitHub stars 2D Noise generation for C++17 and later.

Language Bindings

Library Stars Description License
jni.hpp GitHub stars A modern, type-safe, C++14 wrapper for JNI.
pybind11 GitHub stars Seamless operability between C++11 and Python. License
Selene GitHub stars Simple C++11 friendly bindings to Lua.
Sol GitHub stars Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance. License
v8pp GitHub stars Bind C++ functions and classes into V8 JavaScript engine. License

Language Development

| Library | Stars | Description | License | |--- | ---| ---|--- | | Command Interpreter | GitHub stars | Add a command interpreter (eg., REPL) to any C++ program. | License |

Logging

Library Stars Description License
easyloggingpp GitHub stars Single header C++ logging library.
plog GitHub stars Portable, simple and extensible C++ logging library.
spdlog GitHub stars Fast C++ logging library.

Mathematics

Library Stars Description License
amgcl GitHub stars Solve large sparse linear systems with algebraic multigrid method.
dj_fft GitHub stars FFT library.
eigen Template library for linear algebra. License                  
exprtk GitHub stars C++ Mathematical Expression Toolkit.
fpm GitHub stars Fixed-point math library.
kfr GitHub stars Fast DSP framework, FFT, Sample Rate Conversion, etc.
libmorton GitHub stars                   Methods to efficiently encode/decode Morton codes in/from 2D/3D coordinates.
linalg GitHub stars Short vector math library for C++.
matplotlib-cpp GitHub stars C++ plotting library built on the popular matplotlib.
mathplot GitHub stars Data visualization for simulations (C++20). License
matrix GitHub stars A 2D matrix lib in C++20. License
NumCpp GitHub stars C++ implementation of the Python Numpy library.
random GitHub stars Random for modern C++ with convenient API.
spectra GitHub stars A header-only C++ library for large scale eigenvalue problems.
universal GitHub stars Universal Number Arithmetic.

Memory Management

Library Stars Description License
ugc GitHub stars Incremental garbage collector. License

Mocking

Library Stars Description License
FakeIt GitHub stars C++ mocking made easy.
trompeloeil GitHub stars C++14 mocking framework. License

Networking

Library Stars Description License
asio GitHub stars Asio C++ Library.
asio-grpc GitHub stars Asynchronous gRPC with Asio/unified executors. License
brynet GitHub stars Cross-platform C++ TCP network library.
cppzmq GitHub stars Header-only C++ binding for libzmq.
nygma GitHub stars Network packet processing and indexing.
uvw GitHub stars libuv wrapper in modern C++.

Optimization

Library Stars Description License
ensmallen GitHub stars C++ library for numerical optimization. License

Parsing

Library Stars Description License
lexertl14 GitHub stars The Modular Lexical Analyser Generator. License
Matcheroni & Parseroni GitHub stars C++20 libraries for doing pattern matching using Parsing Expression Grammars
parsertl14 GitHub stars The Modular Parser Generator. License

Parsing Expression Grammars

Library Stars Description License
cpp-peglib GitHub stars PEG (Parsing Expression Grammars) library.
lug GitHub stars A C++17 embedded domain specific language for expressing parsers as extended PEG.
PEGTL GitHub stars Parsing Expression Grammar Template Library.

Portability Definitions

Library Stars Description License
hedley GitHub stars Move #ifdefs out of your code.

Reflection

Library Stars Description License
better-enums GitHub stars C++ compile-time enum to string, iteration. License
magic_enum GitHub stars Static reflection for enums.
meta GitHub stars Macro-free runtime reflection system.
nameof GitHub stars Nameof operator for modern C++.
refl-cpp GitHub stars Compile-time reflection library.
visit_struct GitHub stars A miniature library for struct-field reflection. License

Regular Expression

Library Stars Description License
compile-time regular expressions GitHub stars         A Compile time regular expression matcher. License
SRELL GitHub stars         A ECMAScript (JavaScript) compatible regular expression engine. License

Robotics

Library Stars Description License
manif GitHub stars Small library for Lie theory.

Serialization

Library Stars Description License
alpaca GitHub stars Serialization library written in C++17.
cereal GitHub stars A C++11 library for serialization. License
essentials GitHub stars Transparent serialization/deserialization.
fuser GitHub stars Automatic (de)serialization of C++ types to/from JSON.
YAS GitHub stars A C++11 (de)serialization library with support for binary/text/json archives.
cista GitHub stars simple, high-performance, zero-copy C++ serialization & reflection library.

SIMD

Library Stars Description License
libsimdpp GitHub stars Low-level SIMD library. License
simde GitHub stars Implementations of SIMD instruction sets.
tsimd GitHub stars Fundamental C++ SIMD types for Intel CPUs.

Standard/Support Libraries

Library Stars Description License
bitflags GitHub stars Easily managing set of flags.
cpp-typelist GitHub stars Modern typelist for C++20 License
expected GitHub stars C++11/14/17 std::expected. License
expected-lite GitHub stars Expected objects in C++11 and later. License
flux GitHub stars A C++20 library for sequence-orientated programming. License
gsl GitHub stars ISO C++ Guidelines Support Library (GSL) by Microsoft.
gsl-lite GitHub stars ISO C++ Guidelines Support Library (GSL).
hana GitHub stars Your standard library for metaprogramming. License
itlib GitHub stars Standard-library-like containers and extensions.
leaf GitHub stars Lightweight Error Augmentation Framework. License
libunifex GitHub stars Unified Executors License
match(it) GitHub stars A lightweight pattern-matching library for C++17 with macro-free APIs. License
mp11 GitHub stars C++11 metaprogramming library. License
NanoRange GitHub stars Range-based goodness for C++17. License
numeric_ranges GitHub stars Numeric algorithms for C++20 Ranges. License
optional GitHub stars C++11/14/17 std::optional.
optional-lite GitHub stars A C++17-like optional for C++98/11 and later. License
range-v3 GitHub stars Range library for C++14/17/20. License
rangesnext GitHub stars Tanges features for c+23 ported to C++20. License
span-lite GitHub stars A C++20-like span for C++98/11 and later. License
string-view-lite GitHub stars A C++17-like string_view for C++98/11 and later. License
uberswitch GitHub stars Alternative to the C++ switch statement.
variant-lite GitHub stars A C++17-like variant for C++98/11 and later. License
Windows Implementation Libraries (WIL) GitHub stars                 Readable type-safe C++ interfaces for common Windows coding patterns.                

State Machine

Library Stars Description License
hfsm2 GitHub stars High-performance hierarchical finite state machine framework.
hsm GitHub stars Finite state machine library based on the boost hana.
tinyfsm GitHub stars A simple C++ finite state machine library.
SMLite GitHub stars State machine library for C, C++, C#, Java, JavaScript, Python, VB.Net.
cuestate GitHub stars C++ template metaprogramming FSM. License

Statistics

Library Stars Description License
histogram GitHub stars Multi-dimensional generalized histograms. License
kalman GitHub stars Kalman Filtering Library (EKF, UKF) based on Eigen3.
stats GitHub stars Statistical distribution functions. License

String Utilities

Library Stars Description License
utf-cpp GitHub stars UTF-8/16/32 for Windows/Linux/MacOs.
wildcards GitHub stars String matching using wildcards. License

Templating Engines

Library Stars Description License
inja GitHub stars A Template Engine for Modern C++.

Terminal Utilities

Library Stars Description License
indicators GitHub stars Activity Indicators for Modern C++.
rang GitHub stars A Minimal library for terminal goodies 💄✨.
termcolor GitHub stars Print colored messages to the terminal. License

Testing Frameworks

Library Stars Description License
ApprovalTests.cpp GitHub stars Native ApprovalTests for C++. License
Catch2 GitHub stars Test framework for unit-tests, TDD and BDD. License
doctest GitHub stars The fastest feature-rich C++11/14/17/20 testing framework.
iutest GitHub stars Test framework for unit-tests. License
lest GitHub stars Tiny framework for unit-tests, TDD and BDD. License
snitch GitHub stars Lightweight C++20 testing framework. License
ut GitHub stars UT: C++20 μ(micro)/Unit Testing Framework. License

Unicode

Library Stars Description License
cpp-unicodelib GitHub stars C++17 Unicode library.
uni-algo GitHub stars Unicode algorithms for C++17.

Units

Library Stars Description License
LLNL/units GitHub stars Run-time unit representation and conversion. License
mpusz/units GitHub stars Compile-time dimensional analysis and unit/quantity manipulation.
nholthaus/units GitHub stars Dimensional analysis and unit conversion library.
SI GitHub stars Type safety and user defined literals for physical units.

Validation

Library Stars Description License
cpp-validator GitHub stars C++ library for data validation. License

Web Frameworks

Library Stars Description License
crow GitHub stars Micro web framework inspired by Python Flask. License