Awesome C

A curated list of C good stuff. I give preference to free software for code, and sellers who aren‘t evil for physical resources.

This is released under the GNU Free Documentation License - its text is provided in the LICENSE file.

Compilers

  • Clang - A C compiler for LLVM. Supports C11.

  • GCC - Provides a C compiler as part of its compiler set. Supports C11 and OpenMP.
  • LCC - A Retargetable Compiler for ANSI C. Nonfree (but liberal) license.
  • PCC - A very old C compiler. Supports C99.
  • TCC - Tiny C Compiler; a small, fast C compiler. Supports C99 (except complex types).

Crypto

  • GnuTLS - A secure communication library, implementing SSL, TLS and DTLS.

  • libgcrypt - A general-purpose cryptography library, with a range of available ciphers.
  • LibreSSL - A BSD fork of OpenSSL. Various licenses, all semi-free.
  • OpenSSL - Implementation of the SSL and TLS protocols, and also includes a cryptography library.
  • libsodium - A modern and easy-to-use crypto library.

Database

This lists databases and data stores with C APIs.

  • Hiredis - A minimalistic client library for Redis.

  • LMDB - An ultra-fast, ultra-compact key-value embedded data store.
  • MariaDB - A robust, scalable and reliable SQL server, designed to be a drop-in replacement for MySQL.
  • mongo-c-driver - A high-performance client library for MongoDB.
  • PostgreSQL - A powerful object-relational database system.
  • Redis - An advanced key-value store.
  • SQLite - A self-contained, serverless, zero-configuration, transactional SQL database engine with a C interface.
  • UnQLite - A self-contained, serverless, zero-configuration, transactional NoSQL engine with a C interface.

Editors

These are specifically fancier, IDE-type editors. If you want a programmer‘s text editor, and yours doesn‘t support C, I‘d be quite surprised.

Frameworks

This section has 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 functions.

  • C Algorithms - A collection of common algorithms and data structures for C.
  • EFL - A large collection of useful data structures and functions.
  • GLib - A library of utility functions and structures, designed to be portable, efficient and powerful.
  • GIO - A modern and easy-to-use VFS API.
  • GObject - An object-oriented system and object model for C.
  • libnih - A lightweight library of C functions and structures.
  • libU - A small library of basic utilities, including memory allocation, string manipulation and logging.
  • stb - A range of single-file libraries for C.

Game Programming

Engines

These are provided as examples of C game programming code.

  • Corange - A game engine in pure C.

  • ioquake3 - The Quake3 engine, freed at last.
  • Quake - The Quake engine.
  • Quake2 - The Quake2 engine.

Resources

These are libraries of all sorts that are useful for game programming.

  • Allegro - A cross-platform, video game development and multimedia library.

  • CSFML - A binding for SFML in C.
  • FreeGLUT - An alternative to the OpenGL Utility Toolkit. Allows the creation and management of windows with OpenGL contexts.
  • GLFW - A multi-platform library for creating windows with OpenGL contexts.
  • RetroArch - The reference frontend for libretro.
  • SDL - A cross-platform library designed to provide low-level access to audio, keyboard, mouse, joystick and graphics hardware via OpenGL.

Generic Programming

  • klib - Small and lightweight implementations of common algorithms and data structures.

  • SGLIB - Simple Generic Library; an implementation of a range of generic programming structures and idioms in C.

Graphics

  • Cogl - A GPU graphics and utilities API.

  • Clutter - A UI library based on OpenGL.
  • libjpeg - A library for reading and writing JPEG files.
  • libjpeg-turbo - A faster library for reading and writing JPEG files.
  • libxmi - A function library for rasterizing 2D vector graphics.
  • mozjpeg - An improved JPEG encoder.
  • OpenGL - The industry standard for high-performance graphics, with a native C binding.
  • SDL2 - Simple DirectMedia Layer is a cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D.

Graphical User Interface

These are specifically widget toolkits.

  • Elementary - A widget toolkit. Part of the EFL.

  • GTK+ - A cross-platform widget toolkit.
  • IUP - Another cross-platform widget toolkit.
  • Tk - A basic widget toolkit. Part of Tcl/Tk.
  • XForms Toolkit - A widget toolkit designed for the XWindow system.

JSON

  • Jansson - A C library for encoding, decoding and manipulating JSON.

  • jsmn - A minimalistic JSON parser.
  • json-c - A library for working with JSON.
  • WJElement - Advanced JSON manipulation library, with support for JSON Schema.
  • YAJL - A fast C JSON streaming parser library.

Learning, Reference and Tutorials

This is a list of resources for learning C programming in general, or something useful relating to C programming.

Online

Reference

Beginner

Intermediate

Advanced

Self-study courses

Physical

Reference

Beginner

Intermediate

Advanced

Multimedia

  • FFMPEG - A complete, cross-platform solution to record, convert and stream audio and video.

  • GStreamer - A framework for audio and visual media.
  • lodepng - A simple PNG image decoder and encoder, requiring no other dependencies.

Networking and Internet

  • asnlc - A compiler of ASN.1 specifications into C source code.

  • czmq - A high-level binding for ZeroMQ.
  • GNU adns - An advanced, easy-to-use, asynch-capable DNS client library and utilities.
  • GNU SASL - An implementation of the Simple Authentication and Security Layer and a few common SASL mechanism.
  • GnuTLS - A secure communication library, implementing SSL, TLS and DTLS..
  • gumbo-parser - An HTML5 parsing library in C99.
  • http-parser - An HTTP request/response parser.
  • libcurl - A client-side URL transfer library, supporting a wide range of formats.
  • LibEtPan - A mail library providing an efficient network for IMAP, SMTP, POP and NNTP.
  • libev - Yet another event loop.
  • libevent - An event loop replacement for network servers.
  • libgss - Generic Security Service.
  • libhttpd - A library to add basic web server capabilities to an application or embedded device.
  • libidn - An implementation of the Stringprep, Punycode and IDNA specifications.
  • libmicrohttpd - A small C library that makes it easy to run an HTTP server as part of another application.
  • libsoup - A GNOME HTTP client/server library. Uses GObject.
  • LibreSSL - A BSD fork of OpenSSL. Various licenses, all semi-free.
  • lwan - An experimental, scalable, high-performance HTTP server.
  • mihl - A library for implementing an embedded HTTP server.
  • mongoose - Embedded web server for C.
  • nanomsg - A C-based implementation of ZeroMQ.
  • neon - An HTTP and WebDAV client library with a C interface.
  • onion - HTTP server library, designed to be easy to use.
  • OpenSSL - Implementation of the SSL and TLS protocols, and also includes a cryptography library.
  • oSip - A SIP implementation in C without additional dependencies.
  • socket99 - A wrapper library for the BSD sockets API.
  • Tox - A communication platform, designed to be a Skype-killer.
  • twitc - A mini C library for interacting with the Twitter OAuth API.
  • ZeroMQ - High-performance message passing networking library. Implemented in C++, but has a C interface.

Numerical

  • apophenia - A library for statistical and scientific computing.

  • ATLAS - Automatically Tuned Linear Algebra Software.
  • BLAS - Basic Linear Algebra Subprograms; a set of routines that provide vector and matrix operations.
  • FFTW - The Fastest Fourier Transform in the West; a highly-optimized fast Fourier transform routine.
  • GLPK - GNU Linear Programming Kit; a package designed for solving large-scale linear programming, mixed integer programming and other related problems.
  • GMP - GNU Multple Precision Arithmetic Library; a library for arbitrary-precision arithmetic.
  • GNU MPC - A library for complex number arithmetic.
  • GNU MPFR - A library for arbitrary-precision floating-point arithmetic.
  • GNU MPRIA - A portable mathematics library for multi-precision rational interval arithmetic.
  • GSL - The GNU Scientific Library; a sophisticated numerical library.
  • KISS FFT - A very simple fast Fourier transform library.
  • LAPACKE - A C interface to LAPACK.
  • Yeppp! - Very fast, SIMD-optimized mathematical library.

Parallel Programming

  • OpenMP - A set of C pragmas designed to allow for easy parallelization of code.

  • pth - A portable implementation for non-preemptive priority-based scheduling for multiple threads of execution.
  • pthreads - The POSIX thread library.
  • TinyCThread - A portable, small implementation of the C11 threads API.

Regex

"Some people, when confronted with a problem, think ‘I know, I‘ll use regular expressions‘. Now they have two problems." - Jamie Zawinski.

  • PCRE - An implementation of regexes identical to that of Perl 5.

  • SLRE - Super Light Regular Expression library; a very small implementation of a subset of Perl regex syntax.
  • TRE - A POSIX-compliant, feature-full regex library.
  • T-Rex - Another tiny regex library.

Serialization

  • c-capnproto - An implementation of the Cap‘n Proto serialization protocol.

  • libavro - A C implementation of the Avro data serialization system.
  • msgpackalt - A simple, light and fast binary serialization library.
  • protobuf-c - An implementation of Google Protocol Buffer in C.
  • xdr - External Data Representation; a standard for data serialization.

Source Code Collections

This contains 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 C code that does stuff. The full list is here.

  • clib - Something of a package manager for C. Comes with a bunch of libraries of its own.
  • gnulib - A collection of common GNU code.
  • ulib - Another collection of source code.

Standard Libraries

This contains standard C libraries.

  • Bionic - Google‘s C standard library, developed for Android.

  • dietlibc - A C standard library designed for the smallest possible binaries.
  • glibc - The GNU C Library; an implementation of the C standard library.
  • musl - A standard C library, compatible with POSIX 2008 and C11. Designed for static linking.

String Manipulation

  • bstrlib - The Better String Library.

  • ICU - International Components for Unicode; a library for Unicode support.
  • libunistring - A library for manipulating Unicode strings in C.
  • libgiconv - A text conversion library.
  • SDS - Simple Dynamic Strings; a library for handling C strings in a simpler way, but one that is compatible with normal C string functions. Available via clib.

Testing

  • CHEAT - A very simple unit testing framework.

  • Check - A unit testing framework for C.
  • cmocka - A unit testing framework with support for mock objects.
  • CUnit - Another unit testing framework for C.
  • minunit - Minimal unit testing framework for C.

Text Editor Extensions

While practically any decent programmer‘s text editor supports C, there are some extensions that make it more pleasant. This is categorized by editor.

Emacs

  • Flycheck - Modern syntax checking. For C, it can use either GCC or Clang as a back-end.

  • Yasnippet - A template system, with C templates for common code snippets.

Vim

Tools

This is a list of useful programs to help you write and debug C code which are not editors, libraries or compilers.

  • aimake - A build tool designed to avoid complex configurations.

  • c99sh - Run C files using hash-bang.
  • GDB - The GNU Project debugger; a debugger for C.
  • gprof - A performance analysis tool. Part of GNU binutils.
  • libtool - A generic library support script.
  • rr - A debugger that records non-deterministic executions to allow for deterministic debugging.
  • Valgrind - A range of dynamic analysis tools, including a leak checker.

Utilities

This is a ‘catch-all‘ category for anything that doesn‘t fit well anywhere else.

  • bfd - A library for manipulating binary object files. Part of GNU binutils.

  • ccv - C-based/Cached/Core Computer Vision library; modern computer vision.
  • CommonMark - A C implementation of the CommonMark spec.
  • GNU FreeIPMI - An in-band and out-of-band IPMI implementation.
  • GNU Libffcall - A collection of libraries for building foreign function interfaces.
  • Hans Boehm GC - Garbage collection for C? Don‘t mind if I do!
  • huffandpuff - A minimal Huffman encoder and decoder.
  • libavl - A library containing a range of self-balancing binary trees.
  • libbson - A BSON utility library.
  • libCello - A library introducing higher-level programming to C.
  • libffi - A portable foreign-function interface library.
  • libgit2 - Pure C implementation of Git.
  • libPhenom - An eventing framework for building high-scalability and high-performance systems.
  • libucl - A universal configuration library parser.
  • libuv - Cross-platform asynchronous I/O.
  • mpc - A parser combinator library.
  • ncurses - Coloured terminal UI library.
  • nope.c - A C-language-based, ultra-light software platform for scalable server-side and networking applications (think node.js for C programmers).
  • pbc - A protocol buffers library.
  • rabbitmq-c - A client library for RabbitMQ.
  • Ragel - A DSL for state machines that compiles to C.
  • udpc - An implementation of the Universal Design Pattern.
  • uthash - A hash table implementation, allowing existing structures to be stored in a hash table easily.
  • zlib - A massively-spiffy yet delicately-unobtrusive compression library.

XML

"XML is crap. Really. There are no excuses. XML is nasty to parse for humans, and it‘s a disaster to parse even for computers. There‘s just no reason for that horrible crap to exist." - Linus Torvalds

  • Expat - A stream-oriented XML parser.

  • ezXML - An easy-to-use, fast and lightweight XML parser.
  • libroxml - Another library for parsing XML.
  • libxml2 - A standards-compliant, portable XML parser.
  • mini-xml - A small XML reading and writing library. No dependencies aside from C standard library.
  • VTD-XML - A very fast XML processing framework.

TIP: 由于排版问题,笔者去掉了对应软件的版权,详细信息请参考原文

参考:
<awesome-c>

时间: 2024-10-09 09:14:14