p-ranav / awesome-hpp

A curated list of awesome header-only C++ libraries
The Unlicense
3.52k stars 220 forks source link
awesome-list c-plus-plus cplusplus cpp-library cpp03 cpp11 cpp14 cpp17 cpp20 cpp98 cross-platform header-library header-only libraries list lists modern-cpp resources single-header single-header-lib

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++. License: MIT
args GitHub stars A simple header-only C++ argument parser library. License: MIT
cmd_line_parser GitHub stars Command line parser for C++17. License: MIT
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++. License: MIT
cxxopts GitHub stars Lightweight C++ GNU style option parser library. License: MIT
fire-hpp GitHub stars Create fully functional CLIs using function signatures. License
flags GitHub stars Simple, extensible, header-only C++17 argument parser. License: Unlicense
structopt GitHub stars Parse command line arguments by defining a struct. License: MIT

Audio

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

Benchmarking

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

Communication

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

Compression

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

Concurrency

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

Cryptography and Security

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

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. License: MIT
csv2 GitHub stars Fast CSV parser and writer for Modern C++. License: MIT
CSV Parser GitHub stars Reading, writing, and analyzing CSV files. License: MIT
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++. License: MIT
inih GitHub stars This is a header only C++ version of inih. License
nlohmann/json GitHub stars JSON for Modern C++. License: MIT
json_struct GitHub stars High performance, single header only to serialize and deserialize JSON to C++ structs. License: MIT
jsoncons GitHub stars Construct JSON and JSON-like data formats. License
minicsv GitHub stars Bare minimal CSV stream based on C++ file streams. License: MIT
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. License: MIT
rapidcsv GitHub stars C++ CSV parser library. License
rapidjson GitHub stars A fast JSON parser/generator for C++. License: MIT
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. License: MIT
taocpp JSON GitHub stars C++ header-only JSON library. License: MIT
toml11 GitHub stars TOML for Modern C++. License: MIT
tomlplusplus GitHub stars TOML config file parser and serializer for >=C++17. License: MIT
tortellini GitHub stars A really stupid INI file format for C++11. License: Unlicense License: MIT
valijson GitHub stars JSON Schema validation. License
xml2json GitHub stars A header-only C++ library converts XML to JSON. License: MIT

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++. License: MIT
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. License: MPL 2.0
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. License: MIT
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. License: MIT
fmt GitHub stars A modern formatting library. License: MIT
pprint GitHub stars Pretty Printer for Modern C++. License: MIT
strf GitHub stars A fast formatting library for C++14. License
tabulate GitHub stars Table Maker for Modern C++. License: MIT

Data Querying

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

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. License: MIT
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. License: MIT
immer GitHub stars Postmodern immutable and persistent data structures. License
MPMCQueue GitHub stars A bounded multi-producer multi-consumer concurrent queue. License: MIT
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. License: MIT
robin-map GitHub stars Fast hash map and hash set using robin hood hashing. License: MIT
sfl-library GitHub stars Small vector. Small flat map/multimap/set/multiset (ordered and unordered). C++11. License: Zlib
small GitHub stars Implementations of the main STL containers optimized for the case when they are small. License: BSL
tries GitHub stars Fast and highly customisable C++20 trie implementation. License: GPL-2.0

Debugging

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

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. License: MIT

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. License: MIT

File System

Library Stars Description License
simplebinstream GitHub stars C++ Simplistic Binary Stream. License: MIT
filesystem GitHub stars Cross-platform implementation of std::filesystem for C++11/14/17. License: MIT
glob GitHub stars Glob for C++17. License: MIT
llfio GitHub stars P1031 low-Level file i/o and filesystem library. License
mio GitHub stars Cross-platform C++11 memory mapped file IO. License: MIT
mm_file GitHub stars Memory-mapped files for C++. License: MIT
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++. License: MIT
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. License: Unlicense
Brutus GitHub stars Marching cubes implementation. License: Unlicense
cinolib GitHub stars Process polygonal and polyhedral meshes. License: MIT
cr GitHub stars A Simple C Hot Reload Header-only Library. License: MIT
CxxSwizzle GitHub stars Modern C++ swizzling header-only library. License: MIT
earcut.hpp GitHub stars Fast Polygon triangulation. License: ISC
entt GitHub stars Entity component system (ECS) and much more. License: MIT
glm GitHub stars OpenGL Mathematics (GLM). License: MIT
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). License: Unlicense
nanort GitHub stars Modern ray tracing kernel. License: MIT
px GitHub stars Thread Scheduling, Rendering, and so on. License: MIT
Simple OpenGL Loader GitHub stars Extensible, cross-platform OpenGL loader. License: MIT
Sokol GitHub stars Cross-platform libraries for C and C++. License: Zlib
stb GitHub stars Single-file public domain libraries. License: MIT
Swarmz GitHub stars Swarming (flocking) library for real-time applications. License: Unlicense
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. License: MIT
tweeny GitHub stars A modern C++ tweening library. License: MIT
Vookoo GitHub stars Take the pain out of Vulkan. License: MIT
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. License: MIT
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. License: MIT

GUI

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

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. License: MIT
cpp-httplib GitHub stars A C++11 Cross platform HTTP/HTTPS library. License: MIT
jwt-cpp GitHub stars Create and validate JSON web tokens. License: MIT
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 License: MIT
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. License: MIT
CImg GitHub stars Cool Image, one file: full featured image processing. License: MIT
color-util GitHub stars Colors, Color space converters for RGB, HSL, XYZ, Lab, etc. License: MIT
color GitHub stars Color manipulation/conversion for different types and formats. License: MIT
nanopm GitHub stars NanoPM, single header only PatchMatch.

Language Bindings

Library Stars Description License
jni.hpp GitHub stars A modern, type-safe, C++14 wrapper for JNI. License: MIT
pybind11 GitHub stars Seamless operability between C++11 and Python. License
Selene GitHub stars Simple C++11 friendly bindings to Lua. License: Zlib
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. License: MIT
plog GitHub stars Portable, simple and extensible C++ logging library. License: MPL 2.0
spdlog GitHub stars Fast C++ logging library. License: MIT

Mathematics

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

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. License: MIT
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. License: MIT
cppzmq GitHub stars Header-only C++ binding for libzmq. License: MIT
nygma GitHub stars Network packet processing and indexing. License: BlueOak
uvw GitHub stars libuv wrapper in modern C++. License: MIT

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 License: MIT
parsertl14 GitHub stars The Modular Parser Generator. License

Parsing Expression Grammars

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

Portability Definitions

Library Stars Description License
hedley GitHub stars Move #ifdefs out of your code. License: CC0-1.0

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. License: MIT
meta GitHub stars Macro-free runtime reflection system. License: MIT
nameof GitHub stars Nameof operator for modern C++. License: MIT
refl-cpp GitHub stars Compile-time reflection library. License: MIT
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. License: MIT

Serialization

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

SIMD

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

Standard/Support Libraries

Library Stars Description License
bitflags GitHub stars Easily managing set of flags. License: MIT
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. License: MIT
gsl-lite GitHub stars ISO C++ Guidelines Support Library (GSL). License: MIT
hana GitHub stars Your standard library for metaprogramming. License
itlib GitHub stars Standard-library-like containers and extensions. License: MIT
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. License: CC0-1.0
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. License: Unlicense
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. License: MIT                

State Machine

Library Stars Description License
hfsm2 GitHub stars High-performance hierarchical finite state machine framework. License: MIT
hsm GitHub stars Finite state machine library based on the boost hana. License: MIT
tinyfsm GitHub stars A simple C++ finite state machine library. License: MIT
SMLite GitHub stars State machine library for C, C++, C#, Java, JavaScript, Python, VB.Net. License: MIT
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. License: MIT
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. License: MIT
wildcards GitHub stars String matching using wildcards. License

Templating Engines

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

Terminal Utilities

Library Stars Description License
indicators GitHub stars Activity Indicators for Modern C++. License: MIT
rang GitHub stars A Minimal library for terminal goodies 💄✨. License: Unlicense
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. License: MIT
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. License: MIT
uni-algo GitHub stars Unicode algorithms for C++17. License: CC0-1.0

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. License: MIT
nholthaus/units GitHub stars Dimensional analysis and unit conversion library. License: MIT
SI GitHub stars Type safety and user defined literals for physical units. License: MIT

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