A curated list of awesome header-only C++ libraries
- Argument Parsers
- Audio
- Benchmarking
- Communication
- Compression
- Concurrency
- Cryptography and Security
- Databases
- Data Formats
- Data Mining, Machine Learning, and Deep Learning
- Data Formatting and Presentation
- Data Querying
- Data Structures and Algorithms
- Debugging
- Event Handling Mechanisms
- File System
- Functional Programming
- Geometry, Graphics Processing, and Game Development
- GPU
- GUI
- HTTP and the Web
- Image Processing
- Language Bindings
- Logging
- Mathematics
- Memory Management
- Mocking
- Networking
- Optimization
- Parsing Expression Grammars
- Portability Definitions
- Reflection
- Regular Expression
- Robotics
- Serialization
- SIMD
- Standard/Support Libraries
- State Machine
- Statistics
- String Utilities
- Templating Engines
- Terminal Utilities
- Testing Frameworks
- Units
- Validation
- Web Frameworks
Library | Stars | Description | License |
---|---|---|---|
Argh! | Argh! A minimalist argument handler. | ||
argparse | Argument Parser for Modern C++. | ||
args | A simple header-only C++ argument parser library. | ||
cmd_line_parser | Command line parser for C++17. | ||
CLI11 | CLI11 is a command line parser for C++11 and beyond. | ||
clipp | Powerful & Expressive Argument Parsing for Modern C++. | ||
cxxopts | Lightweight C++ GNU style option parser library. | ||
fire-hpp | Create fully functional CLIs using function signatures. | ||
flags | Simple, extensible, header-only C++17 argument parser. | ||
structopt | Parse command line arguments by defining a struct. |
Library | Stars | Description | License |
---|---|---|---|
minimp3 | Minimalistic MP3 decoder single header library. |
Library | Stars | Description | License |
---|---|---|---|
nanobench | Simple, fast, accurate microbenchmarking for C++11. | ||
picobench | A small microbenchmarking library for C++11. |
Library | Stars | Description | License |
---|---|---|---|
comms | Implement binary communication protocols in >=C++11. |
Library | Stars | Description | License |
---|---|---|---|
Gzip | Gzip header-only C++ library. | ||
interpolative_coding | Binary Interpolative Coding algorithm. | ||
zstr | A C++ header-only ZLib wrapper. |
Library | Stars | Description | License |
---|---|---|---|
cs_libguarded | Multithreaded programming. | ||
mvThreadPool | Simple header-only C++ thread pool library. | ||
taskflow | Modern C++ Parallel Task Programming. | ||
task_system | Better Code: Concurrency - Sean Parent. | ||
transwarp | A header-only C++ library for task concurrency. |
Library | Stars | Description | License |
---|---|---|---|
cppcodec | Encode/decode base64, base64url, base32, etc. | ||
digestpp | C++11 header-only message digest library. | ||
PicoSHA2 | Feader-file-only, SHA256 hash generator in C++. |
Library | Stars | Description | License |
---|---|---|---|
OTL | Oracle, ODBC and DB2-CLI Template Library. | OpenBSD |
Library | Stars | Description | License |
---|---|---|---|
Boost.JSON | JSON parsing, serialization, inspection and modification. | ||
cpptoml | Header-only library for parsing TOML. | ||
csv2 | Fast CSV parser and writer for Modern C++. | ||
CSV Parser | Reading, writing, and analyzing CSV files. | ||
daw_json_link | Static JSON parsing in C++. | ||
Fast C++ CSV Parser | Fast library for reading CSV files. | ||
inih | This is a header only C++ version of inih. | ||
nlohmann/json | JSON for Modern C++. | ||
jsoncons | Construct JSON and JSON-like data formats. | ||
minicsv | Bare minimal CSV stream based on C++ file streams. | ||
picojson | a header-file-only, JSON parser serializer in C++. | ||
rapidcsv | C++ CSV parser library. | ||
rapidjson | A fast JSON parser/generator for C++. | ||
rapidxml | RapidXML fork; XML namespacing, per-element parsing, etc. | ||
simdjson | Parsing gigabytes of JSON per second. | ||
simpleini | Read and write INI-style configuration files. | ||
taocpp JSON | C++ header-only JSON library. | ||
toml11 | TOML for Modern C++. | ||
tomlplusplus | TOML config file parser and serializer for >=C++17. | ||
tortellini | A really stupid INI file format for C++11. | ||
valijson | JSON Schema validation. | ||
xml2json | A header-only C++ library converts XML to JSON. |
Library | Stars | Description | License |
---|---|---|---|
dlib | A toolkit for real-world machine learning and data analysis. | ||
frugally deep | Use Keras models in C++. | ||
hnswlib | Fast approximate nearest neighbors. | ||
MiniDNN | A header-only C++ library for deep neural networks. | ||
nanoflann | Nearest Neighbor (NN) search with KD-trees. | ||
tiny-dnn | Dependency-free deep learning framework in C++14. |
Library | Stars | Description | License |
---|---|---|---|
asap | Creating, displaying, iterating and manipulating dates. | ||
cxx prettyprint | Pretty-printing of any container in C++(0x). | ||
fmt | A modern formatting library. | ||
pprint | Pretty Printer for Modern C++. | ||
strf | A fast formatting library for C++14. | ||
tabulate | Table Maker for Modern C++. |
Library | Stars | Description | License |
---|---|---|---|
boolinq | Simplest C++ header-only LINQ template library. |
Library | Stars | Description | License |
---|---|---|---|
BitMagic | Compressed bit-vectors, logical operations, memory compact containers. | ||
concurrent queue | Fast multi-producer, multi-consumer lock-free concurrent queue. | ||
dynamic bitset | The C++17 header-only dynamic bitset. | ||
frozen | Constexpr alternative to gperf for C++14 users. | ||
hopscotch map | Fast hash map and hash set using hopscotch hashing. | ||
immer | Postmodern immutable and persistent data structures. | ||
MPMCQueue | A bounded multi-producer multi-consumer concurrent queue. | ||
outcome | Lightweight outcome and result. | ||
parallel hashmap | Very fast and memory-friendly hashmap and btree containers. | ||
PGM-index | Blazing fast queries and updates over billions of items using orders of magnitude less memory than other containers. | ||
robin-hood hashing | Fast & memory efficient hashtable based on robin hood hashing. | ||
robin-map | Fast hash map and hash set using robin hood hashing. | ||
tries | Fast and highly customisable C++20 trie implementation. |
Library | Stars | Description | License |
---|---|---|---|
backward-cpp | A beautiful stack trace pretty printer for C++. |
Library | Stars | Description | License |
---|---|---|---|
eventbus | Mediator pattern event bus for C++. | ||
eventpp | Event Dispatcher and callback list for C++. | ||
periodic-function | Callbacks at a specified time interval. |
Library | Stars | Description | License |
---|---|---|---|
simplebinstream | C++ Simplistic Binary Stream. | ||
filesystem | Cross-platform implementation of std::filesystem for C++11/14/17. | ||
glob | Glob for C++17. | ||
llfio | P1031 low-Level file i/o and filesystem library. | ||
mio | Cross-platform C++11 memory mapped file IO. | ||
mm_file | Memory-mapped files for C++. | ||
tinydir | Lightweight, portable C directory and file reader. |
Library | Stars | Description | License |
---|---|---|---|
FunctionalPlus | Functional Programming Library for C++. | ||
immer | Persistent functional data structures in C++. | ||
lager | Redux-like unidirectional data-flow for C++. | ||
schmutz | Easy Guile Scheme C++ bindings. | ||
zug | Transducers (from Clojure) in C++. |
Library | Stars | Description | License |
---|---|---|---|
arcball_camera | Immediate-mode camera for your graphics demos. | ||
cinolib | Process polygonal and polyhedral meshes. | ||
cr | A Simple C Hot Reload Header-only Library. | ||
CxxSwizzle | Modern C++ swizzling header-only library. | ||
earcut.hpp | Fast Polygon triangulation. | ||
entt | Entity component system (ECS) and much more. | ||
glm | OpenGL Mathematics (GLM). | ||
librg | 🚀 Making multi-player gamedev simpler since 2017. | ||
nanort | Modern ray tracing kernel. | ||
px | Thread Scheduling, Rendering, and so on. | ||
Sokol | Cross-platform libraries for C and C++. | ||
stb | Single-file public domain libraries. | ||
Swarmz | Swarming (flocking) library for real-time applications. | ||
tiny-differentiable-simulator | Tiny Differentiable Simulator is a header-only C++ physics library with zero dependencies. | ||
tinygltf | C++11 tiny glTF 2.0 library. | ||
tweeny | A modern C++ tweening library. | ||
Vookoo | Take the pain out of Vulkan. | ||
voxelizer | Header only mesh voxelizer in c99. |
Library | Stars | Description | License |
---|---|---|---|
thrust | Parallel programming library. | ||
vuda | Vulkan-based library that provides a CUDA Runtime API interface for writing GPU-accelerated applications. |
Library | Stars | Description | License |
---|---|---|---|
GuiLite | The smallest header-only GUI library(5 KLOC) for all platforms. | ||
Nuklear | Immediate mode cross-platform GUI library. | ||
WinLamb | C++11 native Win32 GUI library. |
Library | Stars | Description | License |
---|---|---|---|
cinatra | Modern (c++17), Cross-platform Http Framework. | ||
cpp-httplib | A C++11 Cross platform HTTP/HTTPS library. | ||
jwt-cpp | Create and validate JSON web tokens. | ||
RESTinio | Asynchronous HTTP/WebSocket server C++14 library |
Library | Stars | Description | License |
---|---|---|---|
BitmapPlusPlus | Simple and Fast header only Bitmap (BMP) library. | ||
color-util | Colors, Color space converters for RGB, HSL, XYZ, Lab, etc. | ||
nanopm | NanoPM, single header only PatchMatch. |
Library | Stars | Description | License |
---|---|---|---|
jni.hpp | A modern, type-safe, C++14 wrapper for JNI. | ||
pybind11 | Seamless operability between C++11 and Python. | ||
Selene | Simple C++11 friendly bindings to Lua. | ||
Sol | Sol3 (sol2 v3.0) - a C++ <-> Lua API wrapper with advanced features and top notch performance. | ||
v8pp | Bind C++ functions and classes into V8 JavaScript engine. |
Library | Stars | Description | License |
---|---|---|---|
easyloggingpp | Single header C++ logging library. | ||
plog | Portable, simple and extensible C++ logging library. | ||
spdlog | Fast C++ logging library. |
Library | Stars | Description | License |
---|---|---|---|
amgcl | Solve large sparse linear systems with algebraic multigrid method. | ||
dj_fft | FFT library. | ||
eigen | Template library for linear algebra. | ||
exprtk | C++ Mathematical Expression Toolkit. | ||
fpm | Fixed-point math library. | ||
kfr | Fast DSP framework, FFT, Sample Rate Conversion, etc. | ||
libmorton | Methods to efficiently encode/decode Morton codes in/from 2D/3D coordinates. | ||
linalg | Short vector math library for C++. | ||
matplotlib-cpp | C++ plotting library built on the popular matplotlib. | ||
NumCpp | C++ implementation of the Python Numpy library. | ||
random | Random for modern C++ with convenient API. | ||
spectra | A header-only C++ library for large scale eigenvalue problems. | ||
universal | Universal Number Arithmetic. |
Library | Stars | Description | License |
---|---|---|---|
ugc | Incremental garbage collector. |
Library | Stars | Description | License |
---|---|---|---|
FakeIt | C++ mocking made easy. | ||
trompeloeil | C++14 mocking framework. |
Library | Stars | Description | License |
---|---|---|---|
asio | Asio C++ Library. | ||
brynet | Cross-platform C++ TCP network library. | ||
cppzmq | Header-only C++ binding for libzmq. | ||
nygma | Network packet processing and indexing. | ||
uvw | libuv wrapper in modern C++. |
Library | Stars | Description | License |
---|---|---|---|
ensmallen | C++ library for numerical optimization. |
Library | Stars | Description | License |
---|---|---|---|
cpp-peglib | PEG (Parsing Expression Grammars) library. | ||
PEGTL | Parsing Expression Grammar Template Library. |
Library | Stars | Description | License |
---|---|---|---|
hedley | Move #ifdefs out of your code. |
Library | Stars | Description | License |
---|---|---|---|
better-enums | C++ compile-time enum to string, iteration. | ||
magic_enum | Static reflection for enums. | ||
meta | Macro-free runtime reflection system. | ||
nameof | Nameof operator for modern C++. | ||
refl-cpp | Compile-time reflection library. | ||
visit_struct | A miniature library for struct-field reflection. |
Library | Stars | Description | License |
---|---|---|---|
compile-time regular expressions | A Compile time regular expression matcher. |
Library | Stars | Description | License |
---|---|---|---|
manif | Small library for Lie theory. |
Library | Stars | Description | License |
---|---|---|---|
cereal | A C++11 library for serialization. | ||
essentials | Transparent serialization/deserialization. | ||
fuser | Automatic (de)serialization of C++ types to/from JSON. |
Library | Stars | Description | License |
---|---|---|---|
libsimdpp | Low-level SIMD library. | ||
simde | Implementations of SIMD instruction sets. | ||
tsimd | Fundamental C++ SIMD types for Intel CPUs. |
Library | Stars | Description | License |
---|---|---|---|
bitflags | Easily managing set of flags. | ||
expected | C++11/14/17 std::expected. | ||
expected-lite | Expected objects in C++11 and later. | ||
gsl | ISO C++ Guidelines Support Library (GSL) by Microsoft. | ||
gsl-lite | ISO C++ Guidelines Support Library (GSL). | ||
hana | Your standard library for metaprogramming. | ||
itlib | Standard-library-like containers and extensions. | ||
leaf | Lightweight Error Augmentation Framework. | ||
libunifex | Unified Executors | ||
mp11 | C++11 metaprogramming library. | ||
NanoRange | Range-based goodness for C++17. | ||
numeric_ranges | Numeric algorithms for C++20 Ranges. | ||
optional | C++11/14/17 std::optional. | ||
optional-lite | A C++17-like optional for C++98/11 and later. | ||
range-v3 | Range library for C++14/17/20. | ||
rangesnext | Tanges features for c+23 ported to C++20. | ||
span-lite | A C++20-like span for C++98/11 and later. | ||
string-view-lite | A C++17-like string_view for C++98/11 and later. | ||
uberswitch | Alternative to the C++ switch statement. | ||
variant-lite | A C++17-like variant for C++98/11 and later. | ||
Windows Implementation Libraries (WIL) | Readable type-safe C++ interfaces for common Windows coding patterns. |
Library | Stars | Description | License |
---|---|---|---|
hfsm2 | High-performance hierarchical finite state machine framework. | ||
hsm | Finite state machine library based on the boost hana. | ||
tinyfsm | A simple C++ finite state machine library. |
Library | Stars | Description | License |
---|---|---|---|
histogram | Multi-dimensional generalized histograms. | ||
kalman | Kalman Filtering Library (EKF, UKF) based on Eigen3. | ||
stats | Statistical distribution functions. |
Library | Stars | Description | License |
---|---|---|---|
utf-cpp | UTF-8/16/32 for Windows/Linux/MacOs. | ||
wildcards | String matching using wildcards. |
Library | Stars | Description | License |
---|---|---|---|
inja | A Template Engine for Modern C++. |
Library | Stars | Description | License |
---|---|---|---|
indicators | Activity Indicators for Modern C++. | ||
rang | A Minimal library for terminal goodies 💄✨. | ||
termcolor | Print colored messages to the terminal. |
Library | Stars | Description | License |
---|---|---|---|
ApprovalTests.cpp | Native ApprovalTests for C++. | ||
Catch2 | Test framework for unit-tests, TDD and BDD. | ||
doctest | The fastest feature-rich C++11/14/17/20 testing framework. | ||
iutest | Test framework for unit-tests. | ||
lest | Tiny framework for unit-tests, TDD and BDD. | ||
ut | UT: C++20 μ(micro)/Unit Testing Framework. |
Library | Stars | Description | License |
---|---|---|---|
mpusz/units | Compile-time dimensional analysis and unit/quantity manipulation. | ||
nholthaus/units | Dimensional analysis and unit conversion library. | ||
SI | Type safety and user defined literals for physical units. |
Library | Stars | Description | License |
---|---|---|---|
cpp-validator | C++ library for data validation. |
Library | Stars | Description | License |
---|---|---|---|
crow | Micro web framework inspired by Python Flask. |