Namespaces
Variants
Views
Actions

A list of open source C++ libraries

From cppreference.com
< cpp‎ | links
Revision as of 22:43, 3 July 2020 by Peter19980822 (Talk | contribs)

The objective of this page is to build a comprehensive list of open source C++ libraries, so that when one needs an implementation of particular functionality, one needn't to waste time searching on web (DuckDuckGo, Google, Bing etc.).

If you know a library that might be useful to others, please add a link to it here. There are no restrictions on what can be included except that the source of the library must be readily available to download.

The page is provided 'as is' - with the hope of being useful, but without any warranties. Outdated, misleading or wrong links might appear here. If you've noticed one of these, it would be great if you fixed the error.

Contents

Package managers

Audio

  • soundtouch
  • KFR -  Fast, modern DSP framework, DFT/FFT, Audio resampling, FIR/IIR filters, Biquad
  • Aquila -  cross-platform DSP library
  • FFTW -  library for computing the DFT
Fingerprinting
Formats
Tagging
CD

Benchmarking

Library Description License Configuration
Celero Apache License CMake
benchmark A library to benchmark code snippets, similar to unit tests Apache License 2.0 CMake
gperftools 'Google Performance Tools' includes a high-performance, multi-threaded malloc implementation plus tools for benchmarking heap allocation and CPU utilization. BSD 3-Clause "New" or "Revised" License configure
plf::nanotimer Lowest-overhead, cross-platform simple timer class for benchmarking. zlib license

Communication

Library Description License Configuration
sockpp A simple, modern C++ socket library BSD 3-Clause "New" or "Revised" License CMake
libnavajo C++ framework including a fast multithreaded http server, HTML5 Websockets, SSL, X509 and HTTP authentification, compression, cookies and advanced session management, IPv4 and IPv6 (CeCILL-C). CeCILL-C FREE SOFTWARE LICENSE AGREEMENT
C++ RESTful framework C++ micro-framework designed to be embedded into a wide range of applications.
C++ REST SDK asynchronous HTTP client and listener, asynchronous Stream, URI, JSON
cpr a modern C++ HTTP requests library
cpp-netlib cpp-netlib: The C++ Network Library
tacopie C++11 TCP Library
Boost.Asio asynchronous and synchronous networking, timers, serial I/O
Boost.Beast HTTP and WebSocket library built on top of Boost.Asio
gsoap C/C++ development toolkit for XML data bindings, fast WSDL/SOAP/XML Web services, WS-Security, JSON/XML-RPC RESTful services
POCO networking: encryption, HTTP; Zip files
omniORB the fastest, complete and portable CORBA ORB implementation in C++
ACE asynchronous networking, event demultiplexing, messaging
TAO CORBA
wvstreams
Unicomm asynchronous networking, high-level TCP communication framework
restful_mapper ORM for consuming RESTful JSON APIs in C++
Paho MQTT Modern C++ client for MQTT from Eclipse
zeromq fast message queue
nanomsg fast message queue, zeromq successor
nng fast message queue, nanomsg successor
curlpp C++ wrapper for CURL library
Apache Thrift The Apache Thrift software framework, for scalable cross-language services development, combines a software stack with a code generation engine to build services that work efficiently and seamlessly between C++, Java, Python, PHP, Ruby, Erlang, Perl, Haskell, C#, Cocoa, JavaScript, Node.js, Smalltalk, OCaml and Delphi and other languages.
libashttp asynchronous HTTP client library
Simple C++ REST library Very simple and self documenting library for creating a REST API in your c++ application
libtins Network packet crafting and sniffing library
PcapPlusPlus Multiplatform C++ network sniffing and packet parsing and crafting framework
HTTPP Simple, production ready HTTP server built on top of Boost and a client built on top of libcurl. BSD
The Silicon C++14 Web Framework Fast and Robust Web APIs (MIT).
ngrest Fast and easy in use JSON RESTful Web Services Framework (Apache2).
restc-cpp Takes the pain out of accessing JSON API's from C++. HTTP Client, native C++ class to/from JSON serialization, asynchronous IO trough boost::asio coroutines. C++14. MIT
OpenDDS DDS implementation
Breep Event based, high-level, peer-to-peer library, allowing users to directly send and receive objects.
uvw libuv wrapper in modern C++
rest_rpc modern, simple, easy to use rpc framework
EasyHttp A cross-platform HTTP client library with a focus on usability and speed, supporting http response caching and more. MIT License
nghttp2 HTTP/2 C Library and tools (server, client, proxy and benchmarking tools) MIT License
IXWebSocket Open-source WebSocket + HTTP library without dependency, supports SSL and the per message deflate WebSocket extension.
KCP A fast and reliable ARQ protocol that helps applications to reduce network latency. MIT License
gRPC gRPC is a modern open source high performance RPC framework that can run in any environment.
seastar High performance server-side application framework, based on C++14/C++17.
stream-client Lightweight, header-only, Boost-based client-side socket/connector/socket pool/resolver
eCAL high performance inter-process communication
fineftp-server ftp server library for windows and unix

Concurrency

Library Description License Configuration
Intel TBB
OpenMP
Taskflow Parallel Task Programming in Modern C++
RaftLib C++ stream like concurrent actors
Thrust STL-like algorithms and data-structures for CUDA
ViennaCL Linear algebra and algorithms with OpenMP, CUDA, and OpenCL backends
VexCL C++ expression templates library for OpenCL and CUDA
hipSYCL provides a clang-based toolchain and a runtime SYCL implementation that can run on multiple target devices (NVIDIA/AMD GPU,s CPU)
Boost.Compute (unofficial) STL-like algorithms and data-structures for OpenCL
Boost.Interprocess
Boost.Thread
Boost.Atomic
Boost.Lockfree
Boost.MPI
Boost.Context
libopenmpi
libsimdpp
HPX A general purpose C++ runtime system for parallel and distributed applications of any scale
KOKKOS A programming model in C++ for writing performance portable HPC applications
SObjectizer A small framework for simplification of development of concurrent and event-driven applications in C++ by using actor and publish-subscribe models.
BlockingCollection A C++11 thread safe collection class modeled after .NET BlockingCollection.
Xenium A header-only library providing various concurrent data structures and reclamation schemes.
subprocess a cross platform library for running subprocesses.

Configuration

XML
  • libxml++
  • pugixml
  • tinyxml
  • tinyxml2 - Another and work in progress of TinyXML.
  • Xerces
  • gSOAP -  XML data bindings
  • ai-xml - Serialize objects to and from XML by adding a single, minimal, function to a class. Uses libxml++ under the hood.
  • GPDS - General purpose data serializer to serialize objects to and from XML. Uses TinyXML under the hood.
JSON
YAML
TOML
  • toml11 -  TOML parsing library based on C++11
  • toml++ - TOML parser and serializer for C++17 and later
HOCON
  • cpp-hocon The C++ implementation of the HOCON format developed by Pupplet.
CSS

Containers

  • Boost.Any
  • Boost.Array
  • Boost.Bimap
  • Boost.Container
  • Boost.Fusion
  • Boost.Heap
  • Boost.Pointer Container
  • Boost.Tuple
  • Boost.Variant
  • cpp-btree -  btree_map, btree_set, btree_multimap, btree_multiset.
  • TdhLists
  • strict_variant - A fast, never-empty variant targetting C++11. Prevents many undesirable implicit conversions.
  • eggs::variant - Eggs.Variant is a C++11/14 generic, type-safe, discriminated union. It is notable in particular for having very good `constexpr` support.
  • Ygg - An intrusive C++11 implementation of high-performance containers and data structures such as a Red-Black-Tree, an Interval Tree and an Interval Map.
  • plf::list - std::list implementation which sacrifices range-splicing for cache-friendliness, yielding faster insertion, erasure and iteration.
  • plf::stack - Drop-in replacement container for the std::stack container adaptor with better performance than std::vector and std::deque in a stack context.
  • plf::colony - Unordered "bag-like" container which outperforms std:: containers in high-modification scenarios while maintaining valid pointers to non-erased elements regardless of insertion and erasure.
  • ring_span - A simplified implementation of Arthur O'Dwyer's ring_span - ie. a circular buffer view.
  • Frozen -  constexpr perfect-hashing-based frozen sets and maps (Apache 2.0).
  • DataFrame -  C++ DataFrame -- R's and Pandas DataFrame in modern C++ using native types, continuous memory storage, and no virtual functions.

Cryptography

Databases

Embedded languages bindings

Embedded/realtime

  • QP/C++ -  RTOS kernel, dual GPL
  • ETL - Embedded Template Library -  C++ 03, Portable template library tailored for low resource platforms
  • distortos -  object-oriented C++ RTOS for microcontrollers
  • µcuREST -  C++11 REST/JSON server framework for microcontrollers


File metadata

Financial Calculations

Game Engine Architecture

General Multimedia

Generic

  • Abseil
  • Boost -  large collection of generic libraries (Boost License)
  • GSL -  Guidelines Support library implementation, recommended by Bjarne Stroustrup, Herb Sutter and Co in C++ Core Guidelines
  • BDE -  The Bloomberg Development Environment core libraries from Bloomberg L.P. (Apache License)
  • Cinder
  • Dlib -  networking, threads, graphical interfaces, data structures, linear algebra, machine learning, XML and text parsing, numerical optimization, Bayesian nets, and numerous other tasks (Boost License)
  • JUCE -  An extensive, mature, cross-platform C++ toolkit (GPL License)
  • Loki -  design patterns
  • Reason -  xml, xpath, regex, threads, sockets, http, sql, date-time, streams, encoding and decoding, filesystem, compression (GPL License)
  • yomm2 -  Open multi-methods for C++17 (Boost License)
  • Folly -  Facebook open-source library. Library of C++11 components designed with practicality and efficiency in mind.
  • Abseil -  An open-source collection of C++ library code from Google designed to augment the C++ standard library.
  • cxxomfort - Backports of C++ features (C++11 to C++03 and C++1y proposals to C++11/C++03).
  • libsourcey -  Cross-platform C++11 library for high speed networking and media encoding. HTTP, WebSockets, TURN, STUN, Symple and more...
  • OnPosix -  C++ library providing several abstractions (e.g., threading, networking, logging, IPC, etc.) on POSIX platforms.
  • Ultimate++ -  Cross-platform rapid application development framework
  • CAF - The C++ Actor Framework (CAF) is an open source C++11 actor model implementation featuring lightweight & fast actor implementations, pattern matching for messages, network transparent messaging, and more (BSD License).
  • cpp-mmf - A C++98 library that encapsulates memory-mapped-files for POSIX or Windows
  • CommonPP - Multi-purpose library with a strong emphasis on getting metrics out of a project. (BSD)
  • Better Enums - Reflective enums (enum to string, iteration, etc.) with constexpr support. (BSD)
  • Smart Enum - "to_string", "from_string" and more for your enums. (Boost License)
  • nytl - Generic C++17 header-only utility template library. (Boost License)
  • SaferCPlusPlus -  SaferCPlusPlus - Safe compatible substitutes for unsafe C++ primitives, including pointers, int and std::vector. (Boost License)
  • fcppt -  Freundlich's C++ Toolkit (fcppt) is a collection of libraries focusing on improving general C++ code by providing better types and making use of functional programming.
  • bitfield.h -  Bit field structure facility, more portable/flexible than the base language facility.
  • composite_op.h -  Basic class data member introspection, cumbersome and often non-re-entrant, but sometimes useful.
  • Abstract Intrusive Containers -  More flexible than boost::intrusive, but not STL-compatible.
  • Yato -  Modern C++(14/17) cross-platform STL-styled and STL-compatible library with implementing containers, ranges, iterators, type traits and other tools; actors system; type-safe config interface. (Apache-2.0)
  • Kangaru -  A dependency injection container for C++11 and C++14 (MIT License)
  • yaal -  algorithms, collections, arbitrary precision calculation, generic-DSL grammar driven parsers and more (CC BY-ND-NC 4.0)
  • gsl-lite -  A single-file header-only version of ISO C++ Guideline Support Library (GSL) for C++98, C++11 and later (MIT License).
  • nonstd-lite -  Parent of *-lite repositories, a migration path to post-C++11 features for pre-C++11 environments (Boost License).
  • units -  A compile-time, header-only, dimensional analysis and unit conversion library built on c++14 with no dependencies (MIT License).

GPS

Graphic user interface

  • Dear ImGui - A bloat-free graphical user interface library that is highly optimized.
  • FLTK
  • nana[doc] - GUI programming in modern C++ style (Boost License)
  • nanogui[doc] -  Minimalistic cross-platform widget library for OpenGL 3.x or higher
  • WxWidgets[src][doc]
  • OWLNext - Modern update to OWL for writing GUI applications in standard C++ on Windows
  • tiny file dialogs -  a single C C++ cross-platform file (no init, no main loop, 6 modal function calls)
CopperSpice
  • CopperSpice[src][doc] -  CopperSpice is a set of C++ libraries used to develop cross-platform software applications. It is released under the LGPL V2.1 license. It uses modern idiomatic C++ and integrates seamlessly with the STL. CopperSpice was derived from the Qt framework.
  • CsSignal - Standalone C++ thread aware signal/slot library
  • CsString - Standalone C++ unicode aware string library
  • libGuarded - Standalone C++ multithreading library for managing access to shared data
GTK+
Qt

Graphics

  • cairomm
  • nux
  • pangomm
  • gegl
  • nanovg -  2D drawing library based on openGL/DX/metal.
  • bgfx -  Powerful cross-platform graphics rendering library, support platforms include Windows Mac Linux iOS Android Web, rendering backend including DX, opengl, metal webgl and so on.

Images

Plotting
Formats

Graphics (3D)

  • Vulkan
  • OpenGL
  • bgfx Cross-platform, graphics API agnostic, "Bring Your Own Engine/Framework" style rendering library.
  • Ogre3D
  • Diligent Engine A modern cross-platform low-level 3D graphics library.
  • GLEW OpenGL function loading
  • GLAD Customizable, lightweight library for loading OpenGL functions
  • Epoxy Modern successor to GLEW. Abstracts difference between some kinds of GL contexts, which makes it sometimes simpler to use than GLEW. Used by GTK+ project since 2015.
  • GLFW OpenGL window manager
  • GLM Header only C++ mathematics library for rendering
  • hlsl++ Header only C++ math library for rendering using hlsl syntax. Supports SSE and NEON
  • klein C++11/14/17 SSE-optimized Projective Geometric Algebra library for graphics and animation
  • assimp 3D model loading
  • VTK
  • Magnum Lightweight and modular C++11/C++14 graphics middleware for games and data visualization
  • Irrlicht
  • Horde3D
  • Visionaray A C++ ray tracing template library
  • Open CASCADE SDK for 3D CAD/CAM/CAE applications
  • OpenSceneGraph

Image Processing

Internationalization

  • IBM ICU
  • gettext
  • spirit-po -  A small, header-only library which parses po-files and provides an interface similar to GNU libintl. Based on boost::spirit.

Logging

  • Log4cpp - A library of C++ classes for flexible logging to files, syslog, IDSA and other destinations (LGPL)
  • Log4cplus - Logging API providing thread-safe, flexible, and arbitrarily granular control over log management and configuration.
  • spdlog - Super fast, header only, C++ logging library
  • plog - Portable and simple log for C++ in less than 1000 lines of code (MPL2)
  • Boost.Log
  • glog - Google Logging Library
  • log4cxx - Apache log4cxx is a logging framework for C++ patterned after Apache log4j
  • Pantheios - Diagnostic Logging API library, offering a combination of type-safety, efficiency, genericity and extensibility
  • Backward -  Printing nice Python-styled stack traces with colors and source snippets, especially on crashes (MIT License).
  • Quill - C++14 Asynchronous Low Latency Logging Library

Math

Numeral Calculations
  • LibBF - An arbitrary precision numerical calculation library developed by Bellard with a sample program that calculates pi to billions of bits
Linear algebra
  • Boost.uBLAS
  • Eigen
  • Armadillo
  • Blitz++
  • IT++
  • Dlib - linear algebra tools
  • Blaze
  • ETL
  • DecompLib - A header-only C++11 library to decompose a vector into a set of positive definite weighted basis vectors.
  • xtensor - xtensor is a C++ library meant for numerical analysis with multi-dimensional array expressions. (BSD)
  • PETSc - A suite of data structures and routines for the parallel solution of scientific applications modeled by partial differential equations. It supports MPI, and GPUs through CUDA or OpenCL, as well as hybrid MPI-GPU.
Optimization
  • OptimLib -  A C++11 library of numerical optimization methods for nonlinear functions.
  • ceres-solver -  C++ library for modeling and solving large, complicated optimization problems. It is a feature rich, mature and performant library which has been used in production at Google since 2010. (BSD)
Graph theory
Class Library for Numbers
  • cln
  • Universal -  A C++ template library for universal number arithmetic, replacing IEEE floating point (MIT License)
Machine Learning
  • stats++
  • liblinear
  • Dlib -  machine learning tools
  • MLPACK -  machine learning package
  • Shogun -  large scale machine learning toolbox
  • FANN -  Fast Artificial Neural Network Library
Computational geometry
  • CGAL -  Computational geometry algorithms library
  • Wykobi -  Computational geometry library
  • PCL -  Point Cloud library
  • pmp-library -  Polygon Mesh Processing Library
Automata theory

Metaprogramming

  • Boost.MPL - Original metaprogramming library, targeted at C++03, slow
  • Boost.Hana - New metaprogramming library for both types and values
  • Boost.Mp11
  • Boost.CallableTraits
  • Metal - Uses eager metafunctions, 100% SFINAE-friendly
  • Brigand - Uses eager metafunctions, optimized for best performance
  • Meta - Uses eager metafunctions, middle ground between metal and brigand wrt performance
  • Boost.Metaparse - Compile-time parser library, producing types, values, and metafunctions from compile-time strings
  • Boost.Proto - A library for building expression template-backed EDSLs
  • CoMeta - Lightweight, header-only C++14 metaprogramming library
  • visit_struct -  A miniature reflection library, providing structure visitors for C++11/14. Self-contained, 200-400 lines of code depending how you count.
  • refl-cpp -  A modern compile-time reflection library for C++ with support for overloads, templates, attributes and proxies

PDF

Physics and Simulations

  • ReactPhysics3D -  C++ physics engine library for 3D simulations and game
  • ProjectCHRONO -  An Open Source Multi-physics Simulation Engine
  • Bullet -  Physics simulation for games, visual effects, robotics and reinforcement learning

Serialization

Binary serialization
  • UBjsonCpp -  High-performance UBJson read-write library based on C++14
  • binn -  A binary serialization library designed to be compact, fast, and easy to use, itself an implementation of the same name format.
  • bson-cxx -  C++ implementation in BSON format.

to and from XML. Uses TinyXML under the hood.

  • fast_ber - High-performance serialization using BER/DER encoding rules. Encoding layout is defined by ASN.1 schemas. Follows modern C++ practices, written in C++11.

Sorting

  • Timsort - Templated stable sorting function which outperforms quicksort-based algorithms including std::sort, for reversed or semi-sorted data. (MIT)
  • Indiesort - Templated sort-wrapper function which allows use of std::sort (and other random-access sort methods) with non-random-access containers. It also increases the performance of sorting large types in random-access containers and arrays (zLib)

System

  • Infoware - C++ Library for pulling system and hardware information, without hitting the command line. (Creative Commons Zero v1.0 Universal)

Terminal

  • cwidget
  • replxx -  A readline and libedit replacement that supports UTF-8, syntax highlighting & hints.

Testing

  • Boost.Test
  • cppunit
  • Google Test
  • Catch2
  • doctest -  The lightest feature-rich C++ single-header testing framework for unit tests and TDD
  • lest -  A modern, C++11-native, single-file header-only, tiny framework for unit-tests, TDD and BDD (includes C++98 variant).
  • liblittletest -  Portable, one file header-only testing framework
  • ELFspy -  Testing in isolation with fakes and spies - Linux only
  • xtd.tunit -  Modern c++17 unit testing library on Windows, macOS, Linux, iOS and android. Office site
  • bandit -  Human-friendly unit testing for C++11

Text

coding
  • uchardet -  The ability to guess string encoding is basically the same as the uchardet function in Python.
  • win-iconv -  The character set encoding conversion library for Linux and Mac The Windows implementation of iconv is based on the Win32 Character Set Conversion API.
format
  • fmt -  printf is not easy to use, ostream is not easy to use, format is easy to use
Parse
  • PEGTL -  Parsing Expression Grammar Template Library
  • BNFlite -  A single file header only lightweight grammar parser library
Search
  • clucene
  • xapian
  • Step -  Ukkonen's online algorithm for constructing suffix tree, Manber's algorithm for constructing suffix array.
Template Engine
  • inja -  A Template Engine for Modern C++
  • Jinja2C++ -  Modern C++ implementation of Jinja2 templates

Version Control

  • LibGit2 -  Version Control System Git's core library.
  • coo-semver -  The C++ operation library for semantic version numbers.

Video

Web

See also

C documentation for Non-ANSI/ISO Libraries