A curated list of C good stuff. This list contains only open source
code (as defined by the linked Open Source Definition), and sellers who
aren't evil for physical resources.
This is released under a Creative Commons-Attribution-ShareAlike license,
version 4 (SPDX code
CC-BY-SA-4.0). You can find its text in the LICENSE file.
An important note: This project does not index anything C++-related; only
pure C stuff is considered.
Note for contributors: If you want to make a pull request, please read
Computer vision, neural nets, machine learning, and other similar things.
Basically, if your university calls it AI, it lives here.
- ccv - C-based/Cached/Core Computer Vision library; modern computer
- Cranium - Portable, header-only ANN library in C99.
- FANN - Fast Artifical Neural Network library; an implementation of
- Genann - Simple ANN in C89, without additional dependencies.
- KANN - Two-file ANN library.
- LibDEEP - Deep learning library.
Tools that automate the building and testing of projects in C.
- CMake - Cross-platform family of tools designed to build, package and test
- GNU Make - Tool which controls the generation of executables and other
non-source files of a program.
- Meson - Extremely fast, user-friendly build system. Based on Ninja.
- Premake - Command-line utility which reads a scripted definition of a
software project and uses it to generate project files for Visual Studio and
GNU Make. Other targets are also being worked on.
- SCons - Software construction tool using Python.
- xmake - Cross-platform build utility.
- zproject - Project generator and build system support tool.
Compilers, as well as compiler- and compilation-related tooling.
- ccache - Compiler cache designed to speed up recompilation.
- Clang - Compiler for LLVM. Supports C11.
- distcc - Program that allows builds to be distributed among several
- Firm - Library that provides a graph-based intermediate
representation, optimizations and assembly code generation suitable for use in
compilers. Comes with an example C front-end under the same
- GCC - Provides a C compiler as part of its compiler set. Supports
- PCC - Venerable compiler. Supports C99. Various licenses, all
- blosc - Extremely fast, multi-threaded, meta-compressor library.
Various licenses, all open source.
- Brotli - General-purpose lossless compression algorithm library. Has
speeds comparable to DEFLATE, but much higher compression ratios.
- clzip - C version of the high-quality data compressor Lzip (LZMA
- CRoaring - C implementation of Roaring bitmaps.
- FiniteStateEntropy - Two highly-efficient compression codecs optimized
for modern CPUs.
- DENSITY - Super-fast compression library.
- heatshrink - Data compression/decompression library for embedded and
- fast_zlib - Improved zlib, which runs 2 to 10 times faster.
- huffandpuff - Minimal Huffman encoder and decoder. Public domain.
- libbzip2 - Patent-free, high-quality data compression
- Lizard - Formerly LZ5; an efficient compressor with very fast
decompression. Achieves compression ratios comparable with zip and zlib at
decompression speeds of 1000MB/s and faster.
- lz4 - Library for an extremely fast compression algorithm.
- lzo - Very fast data compression library.
- shoco - Compressor for small text strings.
- SIMDComp - Simple library for compressing lists of integers using
binary packing. Makes use of SIMD instructions on x86.
- smaz - Efficient string compression library.
- squash - Compression abstraction library, complete with some
- TurboPFor - Fastest integer compression.
- TurboRLE - Most efficient run-length encoding.
- zip - Really really small zip archive processing library.
- Zlib - Massively spiffy yet delicately unobtrusive compression
- zlib-ng - Zlib replacement with optimizations for 'next-generation'
- Zstandard - Fast, lossless compression algorithm, targeting real-time
compression scenarios at zlib-level or better compression ratios.
Concurrency and Parallelism
- cchan - Small library for channel constructs for inter-thread
communication. Public domain.
- checkedthreads - No race condition goes unnoticed! A simple library for
parallelism, with built-in checking for race conditions.
- ck - Concurrency primitives, safe memory reclamation mechanisms and
non-blocking data structures.
- FCFS RWLock - First-come first-served Readers/Writers lock for POSIX threads.
- libconcurrent - Concurrent programming library, using coroutines, for
- libdill - Library which makes structured concurrent programming
- libhl - Library implementing a thread-safe API to manage a range of data
structures. Also provides some supporting functions and structures for
concurrent and lockfree programming.
- liburcu - Data synchronization library, which scales linearly with the
number of cores.
- mill - Go-style concurrency.
- oclkit - Two-file OpenCL wrapper.
- OCL-MLA - OpenCL Mid-Level Abstractions.
- OpenMP - Set of pragmas designed to allow for easy parallelization of
code. Standard (licensing not applicable).
- OpenMPI - Message passing interface implementation.
- pal - Optimized library for maths, parallel processing and data
- pth - Portable implementation for non-preemptive priority-based
scheduling for multiple threads of execution.
- pthreads - POSIX thread library. Standard (no license applicable).
- TinyCThread - Portable, small implementation of the C11 threads
Mostly library implementations of well-known cryptographic algorithms or
- GNU SASL - Implementation of the Simple Authentication and Security
Layer and a few common SASL mechanism.
- GnuTLS - Secure communication library, implementing SSL, TLS and
- libgcrypt - General-purpose cryptography library, with a range of
- OpenSSL - Implementation of the SSL and TLS protocols. Also includes a
cryptography library. Dual Licensed under the OpenSSL License and the SSLeay License.
- liboqs - Library for quantum-resistant cryptographicl algorithms.
- libsodium - Modern and easy-to-use crypto library.
- libtomcrypt - Fairly comprehensive, modular and portable
cryptographic toolkit. Public domain.
- mbed TLS - Another crypto implementation.
- MIRACL - Multiprecision Integer and Rational Arithmetic Cryptographic
Library; an SDK for elliptic curve cryptography.
- retter - Collection of hash functions, ciphers, tools, libraries and
materials related to cryptography and security. Public domain.
- s2n - C99 implementation of the TLS/SSL protocols, designed to be
simple, fast and with security as a priority.
- sphlib - Set of implementations of various hash functions, including
several cryptographic ones.
- trezor-crypto - Heavily-optimized crypto algorithms for embedded
Databases and data stores with C APIs.
- BerkeleyDB - Library for a high-performance embedded database for
- Groonga - Columnar store with full-text search.
- Hiredis - Minimalistic client library for Redis.
- libmongoc - High-performance client library for MongoDB.
- LMDB - Ultra-fast, ultra-compact key-value embedded data store.
- PostgreSQL - Powerful object-relational database system.
- Redis - Advanced key-value store.
- sophia - Modern, embeddable key-value database.
- sparkey - Simple constant key/value storage library. Designed for
read-heavy loads with infrequent, large bulk inserts.
- SQLite - Self-contained, serverless, zero-configuration, transactional
SQL database engine. Public domain.
- UnQLite - Self-contained, serverless, zero-configuration,
transactional NoSQL engine.
- WhiteDB - Lightweight database library, operating entirely in main
Because we all have to do it sometimes. Various tools for making debugging
easier or better, as well as libraries or code that allows better debugging
- C-Reduce - Tool that takes a large C file with a property of interest
and automatically produces a much smaller C file that has the same
property. Intended to help create minimal bug-demonstrating cases in complex
- CBMC - C Bounded Model Checker; a tool for verification of array
bounds, pointer safety and user-specified assertions.
- cflow - Analyzes a collection of source files and prints a graph
charting control flow in the program.
- Complexity - Tool for measuring the complexity of source
- CScout - Source code analyzer and refactoring browser for C
- DDD - Graphical front-end for a range of command-line
- debug - One-header library for easier 'printf debugging'.
- GDB - GNU Project debugger.
- lldb - LLVM debugger.
- rr - Debugger that records non-deterministic executions to allow for
- Valgrind - Range of dynamic analysis tools, including a leak
- Cxref - Generates documentation in either LaTeX, HTML, RTF or
- DocOnce - Modestly-tagged markup language that can be used to
generate a range of formats.
- Doxygen - De-facto standard tool for generating documentation from
annotated sources. Can generate a large range of formats.
Fancier, IDE-type editors. If you want a programmer's text editor, look
elsewhere. Besides, whatever you use most likely supports C anyway.
Big libraries that provide data structures and other stuff you expect of a
'modern' standard library.
- APR - Apache Portable Runtime; another library of cross-platform utility
- C Algorithms - Collection of common algorithms and data structures.
- CPL - The Common Pipeline Library; a set of libraries designed to be a
comprehensive, efficient and robust software toolkit.
- EFL - Large collection of useful data structures and
functions. Various licenses, all open source.
- klib - Small and lightweight implementations of common algorithms and
- libcork - Utility functions and structures, designed for
resource-constrained systems. Can be embedded.
- libnih - Lightweight library of functions and
- libU - Small library of basic utilities, including memory allocation,
string manipulation and logging.
- PBL - Large library of utilities, featuring data structures, among
- qlibc - Simple and powerful library, designed as a replacement for
GLib while focusing on being small and light.
- TBOX - Multi-platform library with a large number of
Engines, libraries and other helpful things specifically for making games.
- Allegro - Cross-platform, video game development and multimedia
- cglm - 📽 Optimized OpenGL/Graphics Math (glm) for C.
- Chipmunk2D - Fast and lightweight 2D game physics library.
- Corange - Game engine in pure C.
- CSFML - Binding for SFML.
- Darkplaces - Modified version of the Quake2 engine.
- Epoxy - Library for handling OpenGL function pointer management.
- Freecell Solver - Set of libraries and command-line programs for automatically solving FreeCell and some similar variants of card Solitaire.
- FreeGLUT - Alternative to the OpenGL Utility Toolkit. Allows the
creation and management of windows with OpenGL contexts.
- GLFW - Multi-platform library for creating windows with OpenGL
- ioquake3 - Quake3 engine, freed at last.
- kazmath - Maths library for games.
- libao - Cross-platform audio library with a wide variety of
- MATHC - Math library for 2D and 3D programming.
- Orx - Portable, lightweight, plugin-based, data-driven, 2D-oriented
- Quake - Quake engine.
- Quake2 - Quake2 engine.
- raylib - Simple and easy-to-use library to learn video game
- RetroArch - Reference frontend for libretro.
- SDL2 - Cross-platform library designed to provide low-level access to
audio, keyboard, mouse, joystick and graphics hardware via OpenGL.
- sdl-gpu - Library for high-performance, modern 2D graphics. Based on
- SIGIL - Sound, Input and Graphics Integration Library; a simple
alternative to other libraries for doing all those things. Various licenses,
all open source.
- Spearmint - Engine designed for FPS games.
- uastar - Minimal A* implementation.
Programmatic manipulation of graphics in C; if you want to make a GUI, the
Graphical User Interface section has what you need.
Graphical User Interface
Widget toolkits, or things meant to be used in a similar way to them.
Hash function implementations for non-crypto purposes. Cryptographic hashes
can be found in the Crypto section.
- CLHash - Library implementing the ridiculously fast CLHash hashing
function. Only works on Intel Haswell or newer.
- HighwayHash - Fast, strong, SIMD-using hash function. Also contains
an implementation of SipHash (although this is slower).
- SpookyHash - Extremely fast hash function.
- t1ha - Fast Positive Hash - a portable, fast hash function.
- xxHash - Extremely fast hashing algorithm. Comes in 32 and 64-bit
Learning, Reference and Tutorials
Resources for learning C programming in general, or something useful relating
to C programming.
Reference resources online
Beginner resources online
Intermediate resources online
Advanced resources online
Online self-study courses
Lexing and Parsing
Libraries specifically for lexical analysis (or lexing) and syntactic analysis
- flex - Fast lexical analyzer generator.
- GNU Bison - General-purpose parser generator that converts an
annotated context-free grammar into a range of parsers.
- hammer - Parser combinators for binary formats.
- mpc - Parser combinator library.
- re2c - Lexer generator, producing very fast lexers, with access to its
internals. Public domain.
Whether a different, faster malloc or outright garbage collection, anything
to do with managing C memory lives here.
Networking and Internet
Low-level networking and internet-related stuff. If you want something more
comprehensive and high-level, you may want the Web Frameworks section.
- asnlc - Compiler of ASN.1 specifications into C source code.
- CHL - C Hypertext Library - A library for writing web applications in
- czmq - High-level binding for ZeroMQ.
- GNU adns - Advanced, easy-to-use, asynch-capable DNS client library
- gumbo-parser - HTML5 parsing library in C99.
- H20 - A new-generation HTTP server.
- http-parser - HTTP request/response parser.
- ldns - Library to simplify DNS programming.
- libcurl - Client-side URL transfer library, supporting a wide range of
- LibEtPan - Mail library providing an efficient network for IMAP,
SMTP, POP and NNTP.
- libev - Yet another event loop.
- libevent - Event loop replacement for network servers.
- libhttpd - Library to add basic web server capabilities to an
application or embedded device.
- libidn - Implementation of the Stringprep, Punycode and IDNA
- libmicrohttpd - Small library that makes it easy to run an HTTP
server as part of another application.
- libonion - HTTP server library, designed to be easy to
- libquickmail - Library intended to give developers a way to send
email from their applications. Supports multiple To/Cc/Bcc recipients and
attachments without size limits.
- libsagui - Library for cross-platform HTTP servers.
- LibVNCServer - Cross-platform libraries to implement VNC server and/or
- libwebsock - Easy-to-use and powerful web socket library.
- lwan - Experimental, scalable, high-performance HTTP
- mongoose - Embedded web server.
- nanomsg - C-based implementation of ZeroMQ.
- oSip - SIP implementation without additional
- socket99 - C99 wrapper for the BSD sockets API.
- twitc - Mini library for interacting with the Twitter OAuth API.
- Wslay - WebSocket library. Implements version 13 of the WebSocket
protocol, as described in RFC 6455.
- zyre - Framework for proximity-based peer-to-peer applications.
- apophenia - Library for statistical and scientific computing.
- Arb - Library for arbitrary-precision interval arithmetic.
- ATLAS - Automatically Tuned Linear Algebra Software.
- clBLAS - BLAS functions written in OpenCL.
- Cuba - Library for multidimensional numerical integration.
- fft-c - A high-performance Fourier Transform from netlib's fftpack; wrapped in a user-friendly format [
- FFTW - The Fastest Fourier Transform in the West; a highly-optimized fast Fourier transform routine.
- FLINT - Fast Library for Number Theory; a library supporting arithmetic
with numbers, polynomials, power series and matrices, among
- GLPK - GNU Linear Programming Kit; a package designed for solving
large-scale linear programming, mixed integer programming and other related
- GMP - GNU Multple Precision Arithmetic Library; a library for
- GNU MPC - Library for complex number arithmetic.
- GNU MPFR - Library for arbitrary-precision floating-point
- GNU MPRIA - Portable mathematics library for multi-precision rational
- GSL - The GNU Scientific Library; a sophisticated numerical
- KISS FFT - Very simple fast Fourier transform library.
- LAPACKE - Interface to LAPACK.
- LibTomMath - Portable, number-theoretic, multiple-precision integer
library. Supports algebra, digit manipulation, modular reductions, and various
number-theoretic routines. Public domain.
- LibTomPoly - Polynomial-related maths library. Public domain.
- PARI/GP - Computer algebra system for number theory; includes a
compiler to C.
- PETSc - Suite of data structures and routines for scalable parallel
solution of scientific applications modelled by partial differential
- SCS - Splitting Conic Solver; a numerical optimization package for
solving large-scale convex cone problems.
- SLEPc - Library for the solution of large, sparse eigenvalue
problems on parallel computers.
- TomsFastMath - Set of assembly-level-optimized maths operations,
suitable for cryptographic use. Public domain.
- Yeppp! - Very fast, SIMD-optimized mathematical library.
- Onigmo - Fork of Oniguruma, supporting more advanced regexps.
- Oniguruma - Regex library supporting a wide range of encodings, and
incorporating many security-oriented fixes.
- PCRE - Implementation of regexes identical to that of
- SLRE - Super Light Regular Expression library; a very small
implementation of a subset of Perl regex syntax.
- TRE - POSIX-compliant, feature-full regex library.
- binn - Binary serialization format, meant to be compact, fast and
- c-capnproto - Implementation of the Cap'n Proto serialization
- cmp - Implementation of the MessagePack serialization
- flatcc - FlatBuffers compiler and library.
- libavro - Implementation of the Avro data serialization system.
- mpack - Another implementation of the MessagePack serialization
- OPIC - Object Persistence in C; a revolutionary serialization framework,
with matching on-disk and in-memory representations.
- protobuf-c - Implementation of Google Protocol Buffer.
- tpl - Small binary serialization library.
- xdr - External Data Representation; a standard for data
serialization. Standard (no license applicable).
Source Code Collections
Collections of small source code. If you want something big and integrated, check
the Frameworks section.
- CCAN - Modelled after Perl's CPAN, this is a big collection of code
that does stuff. The full list is here. Various licenses, all
- clib - Something of a package manager. Comes with
a bunch of libraries of its own.
- gnulib - Collection of common GNU code. Various licenses, all
- libdjb - Collection of libraries doing various things. (Apparently)
- mmx - Collection of single-header libraries. Various licenses, all
- par - Bunch of single-file libraries.
- Snippets - (Hopefully) useful code snippets and header-only libraries.
- stb - Range of single-file libraries. Public domain.
- tinyheaders - Collection of header-only libraries, primarily oriented
toward game development.
Implementations of the (standard-mandated) C standard library.
Text Editor Extensions
While practically any decent programmer's text editor supports C, there are some
extensions that make it more pleasant. These are labelled by editor.
Useful programs to help you write and debug C code which are not editors,
libraries or compilers.
A 'catch-all' category for anything that doesn't fit well anywhere else.
- ApeTagLibs - Library for working with APEv2 tags.
- argparse - Command-line argument parsing library, inspired by
Python's argparse module.
- attr - Commands for manipulating filesystem extended
- bfd - Library for manipulating binary object files. Part of GNU
- Caffeine - Library for building daemons and services for Linux and
- CException - Implementation of exceptions.
- CommonMark - Implementation of the CommonMark spec.
Variety of licenses, all open source.
- cpu_features - Get CPU features at runtime.
- CRIU - Checkpoint/Restore In Userspace; a software tool (with a C API)
for 'freezing' a running application to disk, then restoring
- D-Bus - Simple way for applications to talk to one
- Discount - Simple implementation of a Markdown parser.
- dlx - Implementation of Knuth's Algorithm X, with example
- docopt.c - Implementation of a command-line option parser.
- dyncall - Another foreign function interface library.
- GNU FreeIPMI - In-band and out-of-band IPMI
- GNU gperf - Perfect hash function generator, given a list of
strings. Outputs C code.
- GNU Libffcall - Collection of libraries for building foreign function
- Hoedown - Fully-standards-compliant, extension-supporting, UTF-8
aware, fast Markdown parser.
- iniparser - Parser for .ini files.
- Kitsune - Efficient, general-purpose framework for dynamic software
- libbson - BSON utility library.
- libCello - Library introducing higher-level programming to
- libcmark - Library for parsing the CommonMark dialect of
- libcoap - Implementation of the Constrained Application Protocol.
- libconfuse - Small configuration file parser library.
- libcox - Library which permits cross-platform system calls and
standard utilities across different operating systems.
- libcsv - Simple, streaming CSV parser.
- libelf - Simple library for parsing ELF files.
- libffi - Portable foreign-function interface library.
- libgeohash - Pure C implementation of the Geohash algorithm.
- libgss - Generic Security Service.
- libimobiledevice - Cross-platform protocol library to communicate
- libnfc - Platform-independent Near-Field Communication
- libPhenom - Eventing framework for building high-scalability and
- libpostal - Library for parsing and normalization of street addresses
around the world. Powered by statistical NLP and open geo data.
- libtrading - Implementation of network protocols for communicating
with exchanges, dark pools and other trading venues. Supports FIX, FIX/FAST
and many proprietary protocols.
- libucl - Universal configuration library parser.
- libusb - Provides generic access to USB devices.
- libuv - Cross-platform asynchronous I/O.
- libvldmail - Your friendly email validation library. No external
dependencies (not even regexps).
- libYAML - YAML 1.1 parser and emitter.
- libxo - Allows an application to generate plain text, XML, JSON and
HTML output using a common set of function calls. The application decides at
runtime what output style should be produced.
- linenoise - Small, self-contained alternative to readline and
- ncurses - Coloured terminal UI library.
- netbsd-curses - Simplified and small version of ncurses, with the same
- nope.c - Ultra-light software platform for scalable server-side and
networking applications (think node.js for C programmers).
- parg - A single-file reimplementation of
getopt with better defaults.
- pbc - Protocol buffers library.
- progressbar - Easy-to-use library for displaying text progress bars.
- rabbitmq-c - Client library for RabbitMQ.
- Ragel - DSL for state machines that compiles to C.
- sort - Collection of sorting routines, which type-specialize at
compile-time with a user-defined type.
- termbox - Library for writing text-based interfaces.
- tinyexpr - Tiny recursive-descent parser, compiler and evaluation
engine for simple mathematical expressions.
- tm - ⏱ Timer and Timeline Utils for C.
- Tulip Indicators - Library of functions for technical analysis of
- whereami - One-file library for locating the current executable on the
- XLSX I/O - Cross-platform library for reading and writing .xlsx
- zlog - Reliable, pure C logging library.
- zproto - Protocol framework for ZeroMQ.
Comprehensive and integrated solutions for building the next brilliant web
application in C.
- Cloudgizer - Cloudgizer is a tool for building web applications as
Apache modules, with emphasis on performance, small-footprint, and more
productive and safer programming in C.
- facil.io - Mini-framework for web applications. Includes a fast HTTP and
Websocket server, and also supports custom protocols.
- KLone - Fully-featured, multi-platform, web application development
framework, targeted especially at embedded systems and
- Kore - Easy-to-use web application framework for writing scalable
web APIs in C.
Technologies designed to bring Windows into the 21st century with respect to
support for C.
- Cygwin - Designed to emulate a POSIX-compatible environment extensively
under Windows. Various licenses, all open source.
- MinGW-w64 - Minimalist environment for C development on Windows with
64 bit support. Various licenses, all open source.
- MSYS2 - Minimal SYStem 2; aims to provide support for a POSIX
environment on Windows, with a package manager based on Arch Linux's
pacman. Packages have individual licenses, otherwise, as MinGW and Cygwin.
- Expat - Stream-oriented XML parser. MIT
- libxml2 - Standards-compliant, portable XML parser. MIT