C/C++ open-source libraries with minimal dependencies
Generally, the following is a list of small, easy-to-integrate, portable libraries which are usable from C and/or C++, and should be able to be compiled on both 32-bit and 64-bit platforms. There is preference for libraries that are C, public domain and single-file. However, we have not personally verified that any specific library is as advertised, or is quality software.
New libraries and corrections
We accept submissions for new libraries and corrections if information for a library below is wrong. Consider either opening a Pull Request, a new Issue or drop a message in our discord channel:
The server is meant to be a pleasant space to chat about C, C++, Libs authoring and Game development specifically.
Rules
Libraries must be usable from C or C++, ideally both.
Libraries must include the licensing terms in the header and source files.
Libraries should be usable from more than one platform (ideally, all major desktops and/or all major mobile).
Libraries should compile and work on both 32-bit and 64-bit platforms.
Libraries should use at most two files (one header, one source): more than two files are mostly forbidden.
Exceptions will be allowed for good reasons.
Other lists
Also you might be interested in other related, but different lists:
: the mighty collection of gamedev utils.
: list of (mostly) small single C functions (licenses not listed)
: package of lots of shareable C functions (mixed licenses)
And some more:
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
,
Main listing
Single-header C files with clause-less licenses are highlighted.
taglibrarydescription"misc"
(1 C++, MIT)RISC-V RV64IM Virtual Machine2d
(1 C, MIT)Blender-style widget rendering using NanoVG2d
(1 C++, MIT)Port of Python's Turtle to C++2d
(2 C, MIT)C Game Library2d
(1 C++, CeCILL)Image processing toolkit (60K LoC)2d
(1 C, ISC)Simulating colourblindness2d
(1 C++, MIT)2D Graphics and text2d
(1, C, WTFPL2)Ultra lightweight font renderer2d
(2 C++, PD)Zero-configuration, immediate-mode 2D graphics for Windows2d
(1 C, ZLIB)Image processing routines2d
(1 C, ZLIB)Simple-to-use lightweight single header modular font rendering library2d
(1 C, ZLIB)Simple ultra-lightweight OpenGL version abstraction based on RLGL (pipeline system)2d
(1 C, MIT)Scalable Font renderer + specification2d
(1 C, PD)Image to Normal Map generator2d
(2 C, PD)Windowing, text and graphics for Windows, Linux and macOS2d
(1 C, MIT)Generate image locally similar to the input image using WFC algorithm3d
(1 C++, PD)API-agnostic immediate-mode debug rendering3d
(1 C, PD)Use your OpenGL renderer to offline bake lightmaps3d
(2 C, ZLIB)Compute tangent space for normal mapping3d
(1 C, MIT)3D model format specification3d
(1 C, PD)Modify lightmap data to hide seams3d
(1 C, MIT)Extensible, cross-platform OpenGL loader3d
(1 C, CC0)Fast and portable software renderer3d
(1 C, PD)Minecraft-esque voxel rendering "engine" with many more features3d
(1 C++, PD)Swarming/flocking algorithm3d
(2 C++, PD)Gizmo objects for interactively editing 3d transformations3d
(1 C, PD)Vertex cache optimization of meshes3d
(1 C, MIT)Memory allocator for Vulkan3d
(1 C, ZLIB)Software rendering with depth, light and shadowai
(2 C, ZLIB)Simple neural networks (ANN)ai
(2 C, MIT)Automatic differentiation (2 files)app
(1 C, ZLIB)A multi-platform single-header user-friendly GUI framework as an alternative to GLFWargv
(1 C++, BSD)Command-line argument parsingargv
(1 C++, BOOST)Composable, command line parser for C++ 11 and beyondargv
(1 C++, BSD)Feature-rich CLI parsing in modern C++11argv
(1 C++, BSD)Command-line argument parsingargv
(1 C++, PD)Command-line argument parsingargv
(1 C, MIT)Command-line argument parsingargv
(1 C, MIT)Command-line argument parsing w/ DOS-style optionsargv
(1 C++, MIT)Command-line argument parsingargv
(2 C, PD)Command-line argument parsingargv
(1 C++, MIT)Command-line argument parsingasm
(2 C, PD)Runtime X64 assembleraudio
(1 C, PD)Wait-free atomic sound mixeraudio
(1 C, MIT)IMA-ADPCM audio decoderaudio
(1 C, MIT)MS-IMA_ADPCM variantaudio
(2 C, BSD3)XM module playback libraryaudio
(1 C, BSD0)Audio resamplingaudio
(1 C, BSD0)AAC-LC decoder with a push-style APIaudio
(2 C, PD)Audio playback and capture libraryaudio
(1 C, BSD0)FLAC decoder with a push-style APIaudio
(1 C, CC0)Minimalistic MP3 decoder with sse/neon supportaudio
(1 C, ZLIB)Full OpenAL 1.1 implementationaudio
(1 C, MIT)Tiny PCM playback under Linuxaudio
(1 C, BSD0)Organya/OrgMaker music rendereraudio
(1 C, MIT)ProTracker MOD file rendereraudio
(1 C, PD)Audio waveform synthesizeraudio
(1 C, PD)Decode ogg vorbis files from file/memory to float/16-bit signed outputaudio
(1 C, BSD0)Freestanding FLAC encoding library in C89audio
(1 C, MIT)SoundFont2 loader & synthesizerbench
(1 C++, MIT)Microbenchmarkingbench
(1 C, PD)Microbenchmarkingc
(2 C, BSD0)Extended errno messagesc
(1 C, PD-0MIT)Stackful cross-platform coroutine libraryc
(1 C, PD)Fast sprintf, snprintf for C/C++cpp
(1 C++, MIT)Implementation of std::filesystemcpp
(1 C++, APACHE2-BOOST)Outcome and result C++ containerscrypt
(2 C++, ISC)Cross platform entropy librarycrypt
(2 C, PD)High-quality small cryptography librarycrypt
(1 C, PD)Crypt-random generatorcrypt
(2 C, PD)High-quality tiny cryptography librarycsv
(1 C++, MIT)CSV parsercsv
(1 C++, BSD)CSV parsercsv
(1 C++, BSD)CSV parsercsv
(1 C++, MIT)CSV parser and serializerdate
(1 C++, MIT)Date and time librariesdebug
(1 C, MIT)Stack tracingdebug
(2 C, ZLIB)Cross-platform debug util librariesdebug
(1 C++, ZLIB)Modular assertion macrodebug
(1 C, BSD)Programmatic debug breakdebug
(1 C++, PD)Flexible loggingdebug
(2 C++, WTFPL2)Flexible assertionsdev
(1 C, MIT)Helper library for Linux device hot-plug eventds
(1 C, PD)Arrays/strings: generic, safeds
(2 C, PD)AVL treeds
(1 C, MIT)Typesafe data structures (vector, list, map, set, string, etc.) with a fully generic API and no boilerplateds
(1 C, PD)Typesafe dynamic arrays (like std::vector) for plain Cds
(1 C, PD)Dynamic array containerds
(1 C++, GPL3)Object which can store any type of primitive data typeds
(1 C, LGPL2)Thread/core safe FIFOds
(1 C, BSD0)Type-safe hashmapsds
(1 C++, MIT)Several C++11 standard-contaner-like libraries and helpersds
(1 C++, PD)Skip Listsds
(1 C, PD)Skip Listsds
(2 C, MIT)Many 2-file libs: hash, sort, b-tree, etcds
(2 C, PD)Intrusive data structuresds
(2 C, BSD)Priority queue (heap)ds
(2 C, MIT)Linked list C++ds
(1 C++, MIT)Efficient minimal memory pool implementation for C++ds
(2 C, WTFPL2)Memory-efficient array of elements with non-pow2 bitcountds
(2 C, ISC)Space-efficient linked-listds
(2 C, BSD)Linked-listds
(1 C, PD)Typesafe dynamic array and hash tables for C, will compile in C++ds
(2 C, BSD)Several 1-header, 1-license-file libs: generic hash, list, etcds
(1 C, BSD0)Type-safe dynamic arraysds
(1 C, MIT)High performance and typesafe generic hash tableds
(1 C, PD)Type-safe dynamic arrays in Cengine
(1 C, PD)Tiny library for making small games with big pixelsengine
(1 C++, BSD3)Game engineengine
(1 C, MIT)A tiny game engine in Ceval
(1 C, MIT)A single-header library for parsing and evaluation of arithmetic expressionseval
(2 C++, 0MIT)C++23 simple math string evaluation with specific error messageseval
(1 C++, MIT)Runtime mathematical expression parser and evaluation engine.eval
(2 C, UNLICENSE)C math string evaluationeval
(2 C, ZLIB)Evaluation of math expressions from stringsfile
(2 C, GPL3)Library to read, write and print binary filesfile
(1 C, MIT)Dirent for Windows: retrieve file & dir infofile
(2 C, PD/MIT-0)File system and archive abstraction library, supports fs/zip/pak/RAM (Win/Mac/Unix)file
(1 C, ZLIB)Single-file port of PhysFS, a fs/zip abstractionfile
(1 C++, MIT)FILE* wrapper does read-write-append-seek-close (Win/Mac/Unix)file
(1 C, BSD)Cross-platform directory reading (Win/POSIX/MinGW)file
(1 C, PD)Single-header C99 filesystem for embedded, game assets, or persistent binary storagefile
(2 C, WTFPL2)Get path/filename of executable or modulefont
(1 C, ISC)Bitmap font blittersfont
(1 C, MIT)Scalable/bitmap/pixmap font rendererfont
(1 C, PD)Quick-and-dirty easy-to-deploy bitmap font for printing frame rate, etcfont
(1 C, PD)Parse, decode, and rasterize characters from truetype fontsgame
(1 C, CC0)Advanced raycasting rendering library, pure C99 with no dependencies, only 32bit int mathgame
(1 C, MIT)Simple game library for Roguelike games: pathfinding, Dijkstra graphs, dungeon generation...game
(1 C, PD)Incrementally compute reachability on gridsgame
(1 C, PD)Herringbone Wang tile map generatorgame
(1 C, PD)Embeddable tilemap editorgpu
(1 C, PD)Compress/interleave arrays from/into GPU buffers.hash
(2 C, PD)SHA1/SHA3/MD5 hasheshash
(1 C, PD)SHA256 implementationhash
(1 C++, MIT)SHA256 implementationhash
(2 C, BSD)Fast hash functionimage
(1 C++, MIT)Bitmap decoder and utilitiesimage
(1 C, PD)Average, min, max mipmap generatorsimage
(2 C, ISC)Image processing and computer vision libraryimage
(1 C++, MIT)Texture bin packing algorithmimage
(1 C, PD)Image feature detection and matchingimage
(1 C, PD)Image loading/decoding from file/memory: JPG, PNG, TGA, BMP, PSD, GIF, HDR, PICimage
(1 C, PD)Resize images larger/smaller with good qualityimage
(1 C, PD)Image writing to disk: PNG, TGA, BMPimage
(1 C, PD)Perlin's revised simplex noise w/ different seedsimage
(1 C, PD)Simple 2D rectangle packer with decent qualityimage
(2 C, PD)TIFF image loaderimageEXR
(2 C++, PD)OpenEXR writer, needs header fileimageEXR
(1 C, BSD)EXR image read/write, uses miniz internallyimageGIF
(1 C++, PD)Animated GIF writer (can only include once)imageGIF
(1 C, PD)(animated) GIF readerimageGIF
(1 C++, PD)Animated GIF writer (CPP file can also be used as H file)imageGIF
(1 C, PD)Animated GIF writerimageJPG
(2 C++, PD)2-file JPEG compress, 2-file JPEG decompressimageJPG
(1 C, MIT)JPEG decoderimageJPG
(1 C, PD)JPEG encoderimageJPG EXIF
(2 C++, BSD2)EXIF metadata extractor for JPEG imagesimageJPG EXIF
(2 C++, BSD)Parse EXIF data from JPEG (XMP w/ TinyXML2 lib)imagePDF
(2 C, PD)PDF writerimagePNG
(2 C, ZLIB)PNG encoder/decoderimagePNG
(2 C++, ZLIB)Tiny PNG loaderimagePNG
(2 C, LGPLv3)PNG writerimagePNM
(1 C++, APACHE2)PBM, PGM and PPM reader and writerimageSVG
(1 C, ZLIB)1-file SVG parser; 1-file SVG rasterizerimageWEBP
(1 C, 0MIT)Single header WebP decoder (only supports lossless images)imageWEBP
(1 C, BSD3)Single header WebP decoderini
(2 C, BSD).ini file parserinput
(1 C, PD)Multi-platform tablet inputjson
(1 C++, BOOST)JSON serialize & deserialize w/ STL supportjson
(1 C, MIT)JSON parserjson
(1 C, MIT)JSON parserjson
(1 C, BSD3)JsonPath implementationjson
(1 C, MIT)Minimalistic JSON parserjson
(1 C, MIT)JSON serializerjson
(1 C, PD)JSON parserjson
(1 C++, MIT)JSON parse, serialize, deserializejson
(1 C, MIT)Extremely fast and extremely small (~60 SLoC) JSON parserjson
(2 C++, MIT)JSON parserjson
(2 C, MIT)JSON parser and serializerjson
(1 C++, BSD)JSON parse/serializerjson
(1 C, BSD2)JSON encode/decoderlog
(2 C, MIT)Extremely small (~150 LoC) logging librarylog
(2 C, MIT)Extensible and configurable logging librarylogic
(1 C++, MIT)Flat FSMlogic
(1 C++, MIT)Hierarchical FSMmath
(1 C, PD)Single-header C99 library for large integersmath
(1 C, MIT)Constraint solver (Cassowary) w/Lua bindingmath
(1 C, PD)Spline utilsmath
(2 C++, BOOST)Line & polygon clipping & offsettingmath
(1 C, PD)2D Constrained Delaunay Triangulationmath
(2 C++, BSD3)2D and 3D Delaunay triangulationmath
(1 C, PD)Find voronoi region in linear time of size of latticemath
(1 C, PD)2D/3D vector/quaternion/matrix math librarymath
(1 C++, PD)Fast Fourier Transformmath
(1 C, GPL2)Discrete and continuous Hidden Markov Models (DHMM, CHMM)math
(1 C, MIT)Find voronoi regions on float/double datamath
(1 C, WTFPL2)Vector librarymath
(1 C, ZLIB)Math with C/OpenCL portabilitymath
(1 C++, MIT)Matrix class container for linear algebra computationsmath
(1 C++, BSD)Build KD trees for point cloudsmath
(1 C, PD)Find voronoi regions on lattice w/ integer inputsmath
(1 C++, MIT)Template open multi-methodsmath
(2 C++, BSD3)Linear and eigen solversmath
(1 C, MIT)Convert (binarized) image to trianglesmath
(1 C, MIT)Generate various 3d geometric shapesmath
(1 C, MIT)Tessellate wide lines and curves with shading attributesmath
(1 C++, MIT)Poisson disk points generator (disk or rect)math
(2 C++, MIT)Polygon triangulation, partitioningmath
(1 C++, PD)Arbitrary-precision integer and rational arithmeticmath
(1 C, PD)Seekable pseudo-random number sequencesmath
(1 C, PD)Fast Fourier Tranform for arbitrary array sizesmath
(1 C, MIT)Compute signed-distance field from antialiased imagemath
(1 C++, MIT)(also HLSL) Approximate transcendental functions optimized for shaders (esp. GCN)math
(1 C, MIT)Simple linear regressionmath
(2 C++, MIT)SimRank graph similarity algorithmmath
(1 C++, APACHE2)Linear algebra math library (C++23)math
(1 C, PD)Sobol & stratified sampling sequencesmath
(1 C, PD)Statistical functionsmath
(1 C, PD)More useful 32-bit modulusmath
(1 C++, MIT)Summed-Area Table generation and sum/avg queriesmath
(2 C, PD)Various 3D intersection calculations, not lib-ifiedmath
(1 C, PD)Vector/matrix librarymath
(1 C, MIT)Convert triangle mesh to voxel triangle meshmath
(2 C++, MIT)Mesh parameterizationmem
(1 C, BSD0)Buddy memory allocatormem
(1 C, MIT)Platform-agnostic memory management system with LLRB trees and modular sub-allocatorsmem
(1 C, PD)Quick-and-dirty malloc/free leak-checkingmem
(1 C, PD)Custom allocators in a single-headermesh
(1 C, MIT)GlTF 2.0 file loadermesh
(1 C, MIT)Wavefront OBJ file loadermesh
(1 C, MIT)Model 3D importer/exporter (with Blender, Goxel, WebGL JS and assimp integration)mesh
(2 C, MIT)Wavefront OBJ file loadermesh
(1 C++, WTFPL2)Quake3 BSP loadermesh
(1 C, MIT)Wavefront OBJ file loadermesh
(1 C++, MIT)Wavefront OBJ file loadermesh
(2 C++, PD)PLY mesh file loadermesh
(1 C, MIT)OBJ file loadermisc
(1 C++, MIT)Library for parsing, printing, iterating and operating on dates.misc
(2 C, PD)Encoder/decoder for ASN.1 DER format.misc
(1 C, PD)Diverse utilitiesmisc
(1 C, GPL2)Color conversion utils (RGB, XYZ, Lab, CIE76, CIE94 and CIEDE200)misc
(1 C++, BSD)Generators in C++misc
(1 C, MIT)BNN (Binarized Neural Networks)misc
(1 C, GPL3)Diverse utilitiesmisc
(1 C, PD)Compiler portability, optimization, static analysis, etc.misc
(1 C++, PD)Allocate/deallocate small integer IDs efficientlymisc
(2 C, MIT)Memory management and data structure toolsetmisc
(1 C++, MPL2)A C++ Generic Algorithm solver librarymisc
(1 C++, ZLIB)Function/method callbacksmisc
(1 C, PD)Process control APImisc
(2 C, MIT)QR Code generatormisc
(1 C, MIT)Qsort algorithm as a C macromisc
(2 C, PD)URL parsermisc
(1 C, PD)C toolchain for modern C programming, strings, arrays, files, threading, ectmisc
(2 C, PD)Implementation of X resource managermisc
(1 C, PD)Implement recursive #include support, particularly for GLSLmisc
(2 C, MIT)Extract English word stemsmisc
(1 C, MULAN2)Cross-platform C/C++ utilitiesnav
(1 C, ZLIB)Floodfill-based path findingnav
(2 C++, ZLIB)Pathfinding with A*net
(2 C, MIT)HTTP server, fork of Mongoosenet
(1 C, MIT)Cross-platform HTTP server/clientnet
(1 C, MIT)Reliable UDP networking librarynet
(1 C, BSD)HTTP servernet
(2 C++, ZLIB)HTTP client requestsnet
(1 C++, MPL2)Cross-platform socket wrapper and data marshalling with native implementations for
,
/
, JSON, and
serialization/deserializationnet
(1 C, BSD3)World/entity synchronization multiplayer librarynet
(2 C++, MIT)Lightweight URL & URI parser RFC 1738, RFC 3986net
(2 C, GPLv2)HTTP servernet
(1 C, MIT)Reliable datagram librarynet
(1 C, MIT)CURL wrappernet
(2 C, PD)Function to create a socket and connect to a remote server with TLSnet
(1 C, PD)TCP and UDP socket wrappernet
(2 C++, MIT)Cross-platform analytics for games (using Google Analytics <4)net
(4 C, PD)Small implementation of (some of) the MQTT protocol in Cnet
(2 C, PD-BSD2)TLS v1.0, 1.2, 1.3 and DTLS 1.0, 1.2 implementationsnet
(2 C++, APACHE2)Standalone HTTP server/clientnet
(2 C, PD)Non-production-use HTTP servernet
(1 C, PD)Cross-platform socket wrappernet
(1 C, MIT)Cross-platform networking w/ Lua bindingnn
(1 C, MIT)Quantized Model Training and Inference Kitpack
(1 C, GPL2)RAR file decompressionpack
(2 C, MIT)Fast but larger LZ compressionpack
(2 C, BSD)Fast but larger LZ compressionpack
(2 C, MIT)Lightweight tar librarypack
(1 C, MIT)Compression, decompression, ZIP file, PNG writingpack
(1 C, PD)Adaptive rANS librarypack
(2 C, BSD)Fast but larger LZ compressionpack
(1 C, MIT)Run-length en/decoderpack
(1 C, PD)Real-time DXT compressorparse
(2 C, MIT)MessagePack parser and serializerparse
(1 C, MIT)PEG (Parsing Expression Grammars) libraryparse
(2 C, ZLIB)Google FlexBuffer parser and writerparse
(1 C, MIT)URL & URI parsingparse
(2 C, GPL)HTML parser (wget)parse
(1 C, GPL2)Regular expression matcherparse
(1 C, PD)Simplify writing parsers for C-like languagesparse
(1 C, MIT)Configurable tokenizerparse
(1 C++, MIT)TOML parser and serializerparse
(1 C, MIT)Extremely small disassembler for ARMv8.2 AArch64 (~65k)parse
(1 C++, PD)Parses formatted strings (reverse of std::format)prng
(1 C++, MIT)Convenient API for randomprng
(1 C, PD)Xoshiro256 algorithmprng
(1 C++, BSD2)Collection of noise generatorsprng
(1 C++, MIT)Fast random for Monte-Carlo simulationsprofile
(4 C++, PD)CPU (and GPU?) profiler, 1-3 header files, uses miniz internallyprofile
(1 C, MIT)Profiler for Linuxprofile
(2 C, APACHE2)CPU/GPU profiler Win/Mac/Linux, using web browser for viewerraster
(1 C++, ISC)2D rasterizerregex
(1 C, CC0)Regex enginescript
(2 C, MIT)Embeddable JavaScript enginescript
(2 C, ZLIB)Interpreter for a Tcl-like scripting languagescript
(1 C++, MIT)Generate Lua bindings in C++script
(1 C, MIT)Single-file port of Lua scripting languagescript
(2 C, MIT)Interpreter for a BASIC dialect scripting languagescript
(1 C, BSD)Interpreter for a Tcl-like scripting languagescript
(2 C, MIT)Portable Python 3.x Interpreter in Modern C for Game Scriptingscript
(2 C, BSD)Interpreter for a subset of Scheme (R5RS/R7RS)script
(1 C, WTFPL2)X Programming Languageserial
(1 C++, PD)Binary serialize & deserlize w/ STL supportserial
(1 C++, MIT)Binary tree serializerserial
(1 C++, MIT)Cross-platform high performance zero copy C++17 serialization/deserializationserial
(1 C++, MPL2)Cross-platform data serialization/deserialization with native implementations for
,
/
, JSON, and
serial
(1 C++, BSD3)Schema-driven serialization libraryserial
(1 C, WTFPL2)Serialization helperserial
(2 C++, BOOST)Struct-field reflectionstring
(1 C, PD)Simple string librarystring
(1 C, MIT)String splitting and processing single-header librarystring
(2 C, MIT)Fast UTF-8 decoder (need a header file)string
(1 C, PD)Dynamic stringsstring
(2 C++, ISC)Printf replacementstring
(1 C++, MIT)Template enginestring
(2 C, MIT)Compute edit distance between two stringsstring
(1 C++, PD)Guaranteed compile-time string literal obfuscation library for C++14string
(1 C++, PD)Simple C++ string type with an optional local bufferstring
(2 C, BSD)Yet another string library for C languagestring
(1 C++, MIT)Null-termination-aware string-view classstring
(1 C++, BOOST)Typesafe printfstring
(1 C, PD)UTF-8 string librarysvg
(1 C++, BSD3)Easy to use SVG librarysys
(1 C, PD)Event loop librarysys
(1 C++, Apache2)Lightweight .env File Loader Librarysys
(1 C, PD)Endianness conversion and detectionsys
(1 C++, MIT)Arguments parsersys
(1 C, MIT)Native file modalssys
(1 C++, PD)Cross-platform colored console textsys
(2 C++, MIT)Foreign Process Informationthread
(1 C, MIT)Cross-platform lock free fixed memory hierarchical work schedulerthread
(1 C++, PD)Lock-free job queuethread
(1 C, PD)Collection of synchronization primitivesthread
(2 C, ZLIB)Cross-platform implementation of the C11 Threads APIthread
(2 C++, ZLIB)Cross-platform implementation of the C++11 Threads APIui
(1 C, ZLIB)High performance 2D UI layout libraryui
(9 C++, MIT)An immediate-mode GUI formerly named "ImGui";
ui
(1 C, PD)A small library for writing CLI applicationsui
(2 C, BSD)Terminal readline w/ history etcui
(1 C, PD)Minimal GUI toolkitui
(1 C, PD)Guts of a text editor for games etc implementing them from scratchui
(2 C, ZLIB)Modal dialogs inc. file open/save (Win/Mac/Linux)ui
(1 C, APACHE2)Platform independent wcwidth with full unicode 9 supportui
(1 C, MIT)Cross-platform webview libraryunit
(1 C++, BOOST)Unit testingunit
(1 C++, BOOST)Unit testingunit
(1 C, MIT)Unit testingunit
(1 C++, MIT)Unit testingunit
(1 C, BSD)Unit testingunit
(1 C, ISC)Unit testingunit
(1 C++, LGPL)Unit testingunit
(1 C, PD)Unit testingunit
(1 C, ZLIB)Unit testingunit
(1 C, MIT)Unit testingunit
(1 C, MIT)Unit testingunit
(1 C, PD)Framework for C89/C++ featuring automatic registration of tests and a polished APIunit
(1 C, BSD)Unit testingunit
(1 C++, BOOST)Unit testingunit
(1 C, PD)Unit testingunit
(1 C, MIT)Unit testingunit
(1 C, PD)Unit testinguuid
(2 C, WTFPL2-MIT)UUID v4 generatoruuid
(1 C, ZLIB)UUID generatorvector
(1 C++, PD)Vector utilities for 2, 3, and 4 element vectors, all inlinevector
(1 C, PD)Vector, quaternion and matrix mathvector
(1 C, PD)Vector mathvector
(1 C, MIT)Vector/matrix/quaternion mathvector
(1 C++, PD)Vector/matrix/quaternion mathvector
(1 C, ISC)Vector/matrix/quaternion mathvideo
,
(1 C, PD)MPEG file writervideo
(1 C, MIT)MPEG1 video and audio decoderxml
(2 C++, MIT)Light-weight C++ XML processing libraryxml
(2 C++, ZLIB)Simple, small, efficient, C++ XML parserxml
(2 C, MIT)Small, fast and correct XML parseryaml
(2 C++, MIT)YAML parser and serializerSecondary listing
Entries in this appendix either do not offer a single-header file directly, or the single-header file is computer generated, or you have to build the single-header by yourself, or lack any other major requirement mentioned above. However, some of you may find the links below still relevant.
taglibrarydescriptiondb
(2 C, PD)Self-contained, SQL database engine.file
(1 C, MIT)File and folder utilitiesnet
(1 C, MIT)WebServer with embedded JSON/HTML utilitiespack
(? C, BSD3)Fast real-time compression algorithmsys
(1 C, ???)Cross-platform cpuid intrinsicsys
(1 C, ???)Import address table hooking library (x86/x64,w32)List FAQ
Can I link directly to this list?
Yes. For historical reasons,
Why isn't library XXX which is made of 3 or more files on this list?
We draw the line arbitrarily at 2 files at most. Some of these libraries are still easy to drop into your project and build, so you might still be ok with them. But since people come to stb for single-file public domain libraries, we feel that starts to get too far from what we do here.
Why isn't library XXX which is at most two files and has minimal other dependencies on this list?
Probably because we don't know about it, feel free to submit a pull request or issue (it can be your own library or somebody else's). But we might not include it for various other reasons, including subtleties of what is 'minimal other dependencies' and subtleties about what is 'lightweight'.
What are the differences between C, C++ and C/C++ in the API column?
For the API column, "C" means a C library that may be C++ compatible but this not guaranteed nor verified, "C++" means C++ only and thus not C compatible, and "C/C++" means a C library with additional features when compiled in C++ mode.
Why are the LICENSING terms required in the header and source files?
Please note that every file that must be included in a user's project counts; a header and a source file is 2 files, but a header file, source file, and LICENSE (if the license isn't in the source file) is 3 files, and won't be accepted, because it's not 2 files. But actually 'LICENSE' is a problem for just dropping the library in a source tree anyway, since it's not scoped to just the library, so library authors are encouraged to include the license in the source file and not require a separate LICENSE.