Resource list for alternative libraries and programs that are lightweight, not bloated, efficient or have other useful design characteristics and may be usable with musl.
Alternative Libraries and Programs
- pkgconf - Drop in replacement for pkg-config with no circular dependencies. Does not require glib.
- netbsd-curses - Drop in replacement for ncurses and ncursesw, ported from netbsd. considerably smaller than ncurses.
- slibtool - Independent reimplementation of slibtool, aiming to maintain compatibility and removing features that are unneeded on modern systems.
- cDetect - C replacement for feature detection generally provided by utilities like GNU autotools.
- freeglut - Replacement for glut.
- libutf - UTF8 library (note that by using musl, UTF8 support is automatically enabled. no need to use any 3rd party library)
- gettext-tiny - gettext replacement. Provides an extra-compatible implementation of libintl for musl, or a no-op, along with several no-op gettext utilities, and a complete msgfmt implementation.
- gettext-stub - Provides a stub replacement for libintl.
- libdrpc - Port of RPC based on Android’s libdrpc. Replaces parts of older glibc RPC functionality and/or libtirpc.
- libsep - Minimal RPC library to assist compartmentalization of small applications.
- minised - Faster but limited earlier version of sed. (note that busybox 1.20.2’s sed implementation is 100% POSIX compatible and feature-complete)
- ignite - init replacement, works with runit.
- linenoise - lightweight readline replacement.
- libedit - drop-in replacement for readline (needs a handful of symlinks). about 30% less code. lacks some rare functions but is compatible with a number of readline users, like gdb.
termbox - alternative to ncurses for simple terminal apps. 16 colors only. very small, clean, well designed code.only up to commit 66c3f91b
- tinyalsa - alternative to alsalib (interfacing with kernel’s ALSA API).
- libnl-tiny - drop-in replacement for netlink (libnl 1.2). may need some compatibility CFLAGS.
- uuterm - slim terminal emulator written by musl’s author.
- udhcpc - small DHCP client, part of Busybox. use these two scripts to operate it.
- ndhc - small DHCP client, focus on security.
- mandoc - alternative to massively bloated groff and accompanying manpage implementation.
- moe - A powerful and user-friendly console text editor (alternative to GNU Nano and Joe), but written in C++…
- textadept - Highly configurable and customizable text editor written in C (and Lua) and based on Scintilla editor widget. Terminal version works with ncurses or pdcurses. Also check out Scinterm, the ncurses based version of the Scintilla editor component.
- slock - minimalist alternative to xlock and xlockmore.
- star - Alternative to GNU tar.
- uSTL - replacement for the C++ STL (Standard Template Library).
- samurai - drop-in replacement for ninja written in C.
- ETL - Embedded Template Library. A C++ template library for embedded applications.
- svn-lite - read-only replacement for bloated apache.org SVN client. includes svn2git tool. useful for checking out that occasional repo still not migrated to git.
- Sortix libz cleaned up, modern fork of zlib.
- libarchive bsdtar offers a replacement for gnu tar.
- Lzip family of data compressors based on the LZMA algorithm. See [Benchmark], and [Quality-assurance].
- XZ Embedded small XZ decompressor library.
- lzo very fast compression library.
- gzfile.c C routines to read gzipped files.
- miniz Single C source file Deflate/Inflate compression library with zlib-compatible API, ZIP archive reading/writing, PNG writing.
- flate small gzip compatible compressor lib
- lz4 extremely fast (BSD-licensed) compression algorithm
- lz4 alternate lz4 implementation (BSD-licensed), even smaller
- basic compression library non-bloated (zlib-licensed) implementation of several basic compression algorithms.
Large Text Compression Benchmark
- TweetNaCl tiny, fully NaCl-compatible high-security cryptography library (single C file)
- libtomcrypt public domain cryptography library
- kripto lightweight cryptography library written in ISO C99. WIP.
- libsodium encryption/decryption library
- tropicssl SSL library (BSD) - unmaintained and lacking a few patches for recent vulnerabilities found in PolarSSL.
- PolarSSL SSL library (GPL) - commercialized and relicensed fork of tropicssl.
- cyassl SSL library (GPL)
- axtls SSL library (BSD license)
- selene SSL/TLS library (Apache license)
- Dropbear replacement for OpenSSH.
- LibreSSL drop-in replacement for (and fork of) OpenSSL.
- tinyCDB small constant database library. Perl wrappers are available on CPAN.
- LMDB high-performance, mmap’d key-value store used in the OpenLDAP project.
- Agar MIT-licensed, lightweight GUI toolkit lib written in C
- iup lightweight and portable GUI toolkit written in C, has Lua bindings
- mtk lightweight GUI library written in C. currently writes directly to videomem of the milkymist open source hardware platform. requires port to X/SDL/FB.
- GraphApp Toolkit for platform-independent graphical user interface programming in the C language.
- m2tklib Mini Interactive Interface Toolkit Library - a portable graphical and character user interface (GUI+CUI) library for embedded systems.
- ftk GUI library for embedded systems.
- SVG library
- SDL_svg library
- lodepng single-file implementation to read png files. requires zlib.
- SOIL Simple OpenGL Image Library
- gleri OpenGL implementation for remote GL usage.
- TinyGL OpenGL implementation with software rendering. needs some fixes to work on 64bit arches.
- mpv video player forked from mplayer2 with tons of junk removed. builds in seconds.
- ucpp C99 preprocessor library and program.
- mcpp another C99 preprocessor library and program.
- sparse mostly C99 compatible semantic analyzer and C frontend written by Linus Torvalds.
- firm/cparser C99 compatible C compiler and optimization framework. x86 and SPARC backends.
- GPP General Purpose Preprocessor. Has added functionality not available in a standard C preprocessor. Can be used as a preprocessor or working with templates.
- vbcc mostly C99 compatible C compiler. open source but non-free LICENSE.
- cproc very promising and clean C11 compiler, using QBE as its backend. can compile most C codebases, including GCC 4.7.4. roughly 10x faster than GCC 8.
- lacc very fast C11 compiler, targetting amd64. not far away from approaching TCC’s speed.
- pcc fast C99 compiler, targetting various archs. about 20x faster than gcc while achieving ~80% of its performance.
- qbe codegen backend for compiler projects. current emits code for amd64 and aarch64. achieves ~70% of performance of GCC -O2, with roughly 10KLOC.
- mir JIT codegen backend. supports most 64bit archs, and features a full C11 compiler frontend to generate mir bytecode, and an interpreter for the bytecode. targets 70% of GCC -O2 performance.
- lightning very versatile JIT codegen backend, using a single input RISC mnemonic language, and featuring codegen for almost all existing architectures.
- Lua is a full-fledged small embeddable as well as standalone language. Pretty popular, but some semantic choices may make conscious programmer cringe: accessing non-existent (mistyped) variable returns legitimate value, array indexes start from 1, etc.
- Quasar m4 is a small GNU m4-compatible re-implementation derived from the FreeBSD m4.
- Squirrel is embeddable language with C-like syntax and minimal number of
syntax/semantics idiosyncrasies. Uses reference counting. Core builds to
~250KB for i386. uses C++ though.
- General-Purpose Squirrel - fork to make a standalone general-purpose language out of Squirrel core, without compromising on lightweightedness.
- jim embedded Tcl scripting engine in ANSI C. compiles to 100-200KB depending on feature set.
- 42TinyJS Fork of TinyJS with more functionality.
- tinypy Minimalist implementation of python in 64k of code.
Musl’s regular expressions pattern matching routines are based on the TRE library. The Musl version of the code contains at least two bug fixes that were never fixed in the original code. For file pattern matching (fnmatch), musl uses an implementation based on the “Sea of Stars” algorithm.
Comparing Perl regular expressions implementations to Regex implementations shows pattern matching performance for various cases, but it can be like comparing apples to oranges. Perl regular expression pattern matching is not equivalent to a regular language which can be solved by a finite state automata. Some regex extensions also may not be compliant with the definition of a formal regular language.
- Regular Expression Matching Can Be Simple And Fast One comparison between regex and Perl regular expressions.
- Regex Benchmark Compares various regular expression methods' performances.
- PCRE performance Comparison of PCRE JIT with other regular expression methods' performances. Older performance comparisons don’t typically include PCRE JIT which has better performance than standard PCRE. They just use standard PCRE.
Code Collections and Basic Libraries/Programs
- Heirloom Project
- Utilities Chest - a set of Unix utilities written to be simple and small
- obase Port of OpenBSD userland to Linux
- noXCUse New Open XCU Simple Edition; or, No Excuse for bloat and brokenness: a set of Unix utilities developed by musl’s author.
- pikhq-coreutils a (small) set of Unix utilities.
- hardcore-utils a (small) set of Unix utilities.
- sbase portable set of suckless Unix utilities
- ubase Linux-specific set of suckless Unix utilities (util-linux replacement)
- lazy-utils a (small) set of Unix utilities to complement toybox
- usul From the main developer of sbase. non-POSIX tabular Unix utilities.
- lit cave Has a lot of lightweight replacement programs, including a troff implementation, utilities using framebuffer and a C compiler.
- elks The elks tarball includes a collection (“elkscmd”) of very lightweight standard Unix programs, taken from Minix and other sources. Also includes lightweight man alternative (bugfixed version is included in hardcore-utils).
- skarnet software Various utilities.
- Bizarre Sources Init replacement and other small programs.
- Stuff that rocks Suckless.org recommendations on libraries they prefer.
- Harmful software Uriel’s alternatives list. Not maintained.
- Puppy Linux forum thread on Unbloated resources
- choosing an ssl library
- Busybox tiny utility recommendations
- Unbloated resources in C (beware of stb* from nothings.org since author is ignorant about invoking UB)
- MinGW Useful links I realize the page is for MinGW, but it has several cross-platform library recommendations including a large list of GUIs. It’s easier to refer to that page than to try to maintain two sets of library lists (here and at the MinGW wiki) for certain categories.