Lightweight C Applications and Libraries
Mar. 19th, 2022 01:36 pmWhile I have other lists that cover a variety topics, wanted one that just had useful lightweight C programs, utilities and libraries. So, I'll be repeating some links here. However, I hope to add some new projects as well. I'd also be interested in hearing suggestions that fit the criteria of lightweight, cross-platform C projects. If you're aware of any I've left off this list, please let me know.
bard
Ebook reader with text-to-speech support using SDL and flite. I have some patches for this program to improve portability and support using SDL2.
https://github.com/festvox/bard
BearSSL
Rather secure implementation of the SSL/TLS protocol. Can be used with curl.
https://bearssl.org/
cal
Command line calendar.
http://unicorn.us.com/cal.html
cDetect
C based alternative to GNU configure/autoconf. More info at IngwiePhoenix's cDetect project ( https://github.com/IngwiePhoenix/cDetect ). Plus, I've forked the project and use it with many of my builds from source code. I've added support for cross-compiling and many, many other features. Contact me if you'd like a copy.
http://cdetect.sourceforge.net/
csvutils
CSV command utilities. Uses libcsv.
https://github.com/rgamble/csvutils
curl
Command line data transfer tool.
https://curl.se/
diction and style
Analyze documents for readability and other metrics. Find grammatical issues.
https://www.gnu.org/software/diction/
diff
diff implementation for sbase. Check the follow-up mailing list threads for further patches.
https://lists.suckless.org/dev/1601/28247.html
diffh
Works with diff and creates an easy to read display of differences between files.
https://sourceforge.net/projects/diffh/
dr_libs
Single file header audio decoding libraries.
https://github.com/mackron/dr_libs
easylzma
Public domain compression and extraction library for lzma.
https://github.com/lloyd/easylzma/tree/master
fcurl
Library to simplify working with curl.
https://github.com/curl/fcurl
BSD gettext
Older BSD gettext/libintl implementation. I have a fork of this one as well. Also, check out the BSD Citrus Project.
https://www.mmnt.net/db/0/18/ftp.khstu.ru/pub/unix/distfiles
gifsicle
GIF animator utility.
http://www.lcdf.org/gifsicle/
grafx2
Graphics editor.
http://grafx2.chez.com/
BSD gzip
BSD version of the gzip compression/decompression program. There are various forks to port this to operating systems other than BSD. I have a portable fork as well.
https://github.com/NetBSD/src/tree/trunk/usr.bin/gzip
less
Less is more than more, pager program.
https://www.greenwoodsoftware.com/less/
libcsv
ANSI C library to read and write CSV files.
https://github.com/rgamble/libcsv
libgrapheme
C99 Unicode library including encoding, decoding and line-break functionality.
https://libs.suckless.org/libgrapheme/
liblzw
Library for LZW (.Z) compression/decompression.
http://freestdf.sourceforge.net/liblzw.php
libtomcrypt
Public Domain cryptography library.
https://github.com/libtom/libtomcrypt
libutf
C89 UTF-8 library which includes an API compatible with Plan 9's libutf plus a number of improvements.
https://github.com/cls/libutf
lxsplit
Command line file split/join tool.
http://lxsplit.sourceforge.net/
man
C program to view standard man pages. Now part of Elks (elkscmd/sys_utils).
https://github.com/jbruchon/elks/blob/1b6110b73fbb123021a5a29b05d8fa9caef33235/elkscmd/sys_utils/man.c
https://github.com/rofl0r/hardcore-utils/blob/master/man.c
mandoc
BSD version of man page utilities. Uses their manpage format. Includes tools to convert to manpage format used by most man tools.
http://mandoc.bsd.lv/
https://embedeo.org/ws/doc/man_windows/
minicpio
Mini cpio compression and decompression routines.
https://github.com/rayae/minicpio
minizip library
A zip library for zlib. Useful when working with files in zip format. Code is in the contrib section of zlib.
http://zlib.net/
nanosvg
Lightweight SVG library.
https://github.com/memononen/nanosvg
ncurses hexedit
Curses based hex editor.
http://www.rogoyski.com/adam/programs/hexedit/
nemini
Lightweight SDL2 based Gemini client.
https://github.com/neonmoe/nemini
BSD patch
BSD fork of the patch program. I have a fork of this as well with some portability additions to better handle carriage return/line feed issues.
https://github.com/openbsd/src/tree/master/usr.bin/patch
pdfconcat
Concatenates PDF files.
https://github.com/pts/pdfconcat
pdftxt
Convert PDF to text. Helpful for searching PDFs with grep.
https://litcave.rudi.ir/
pdlzip
Compression/decompression for lzma format compatible with the lzip data compressor.
https://www.nongnu.org/lzip/pdlzip.html
picaxo
Graphics viewer.
http://gigi.nullneuron.net/comp/picaxo/
pkgconf
Drop in replacement for pkg-config with no circular dependencies.
https://github.com/pkgconf/pkgconf
pspg
Postgres pager provides a console based pager for PostgreSQL, MySQL, CSV and other formats. Uses ncurses (or pdcurses).
https://github.com/okbob/pspg
sbase
Efficient implementations of core base utilities.
https://core.suckless.org/sbase/
shot
Command line screenshot program.
https://github.com/rr-/shot/
sox
Sound exchange utility. Converts sound formats. Plays audio files.
http://sox.sourceforge.net/
stb
Public Domain single file header libraries. Includes stb_truetype.h, a lightweight alternative to the freetype library, which can parse, decode and rasterize characters from truetype fonts.
https://github.com/nothings/stb
TinyLZMA
Minimal LZMA compressor and decompressor.
https://github.com/WangXuan95/TinyLZMA
unarr
Decompression library for rar and other formats. Part of sumatrapdf project.
https://github.com/sumatrapdfreader/sumatrapdf/tree/master/ext/unarr
Standalone version of unarr.
https://github.com/selmf/unarr
x509cert
Generate x509 certificate requests. Works with BearSSL.
https://github.com/michaelforney/x509cert
bard
Ebook reader with text-to-speech support using SDL and flite. I have some patches for this program to improve portability and support using SDL2.
https://github.com/festvox/bard
BearSSL
Rather secure implementation of the SSL/TLS protocol. Can be used with curl.
https://bearssl.org/
cal
Command line calendar.
http://unicorn.us.com/cal.html
cDetect
C based alternative to GNU configure/autoconf. More info at IngwiePhoenix's cDetect project ( https://github.com/IngwiePhoenix/cDetect ). Plus, I've forked the project and use it with many of my builds from source code. I've added support for cross-compiling and many, many other features. Contact me if you'd like a copy.
http://cdetect.sourceforge.net/
csvutils
CSV command utilities. Uses libcsv.
https://github.com/rgamble/csvutils
curl
Command line data transfer tool.
https://curl.se/
diction and style
Analyze documents for readability and other metrics. Find grammatical issues.
https://www.gnu.org/software/diction/
diff
diff implementation for sbase. Check the follow-up mailing list threads for further patches.
https://lists.suckless.org/dev/1601/28247.html
diffh
Works with diff and creates an easy to read display of differences between files.
https://sourceforge.net/projects/diffh/
dr_libs
Single file header audio decoding libraries.
https://github.com/mackron/dr_libs
easylzma
Public domain compression and extraction library for lzma.
https://github.com/lloyd/easylzma/tree/master
fcurl
Library to simplify working with curl.
https://github.com/curl/fcurl
BSD gettext
Older BSD gettext/libintl implementation. I have a fork of this one as well. Also, check out the BSD Citrus Project.
https://www.mmnt.net/db/0/18/ftp.khstu.ru/pub/unix/distfiles
gifsicle
GIF animator utility.
http://www.lcdf.org/gifsicle/
grafx2
Graphics editor.
http://grafx2.chez.com/
BSD gzip
BSD version of the gzip compression/decompression program. There are various forks to port this to operating systems other than BSD. I have a portable fork as well.
https://github.com/NetBSD/src/tree/trunk/usr.bin/gzip
less
Less is more than more, pager program.
https://www.greenwoodsoftware.com/less/
libcsv
ANSI C library to read and write CSV files.
https://github.com/rgamble/libcsv
libgrapheme
C99 Unicode library including encoding, decoding and line-break functionality.
https://libs.suckless.org/libgrapheme/
liblzw
Library for LZW (.Z) compression/decompression.
http://freestdf.sourceforge.net/liblzw.php
libtomcrypt
Public Domain cryptography library.
https://github.com/libtom/libtomcrypt
libutf
C89 UTF-8 library which includes an API compatible with Plan 9's libutf plus a number of improvements.
https://github.com/cls/libutf
lxsplit
Command line file split/join tool.
http://lxsplit.sourceforge.net/
man
C program to view standard man pages. Now part of Elks (elkscmd/sys_utils).
https://github.com/jbruchon/elks/blob/1b6110b73fbb123021a5a29b05d8fa9caef33235/elkscmd/sys_utils/man.c
https://github.com/rofl0r/hardcore-utils/blob/master/man.c
mandoc
BSD version of man page utilities. Uses their manpage format. Includes tools to convert to manpage format used by most man tools.
http://mandoc.bsd.lv/
https://embedeo.org/ws/doc/man_windows/
minicpio
Mini cpio compression and decompression routines.
https://github.com/rayae/minicpio
minizip library
A zip library for zlib. Useful when working with files in zip format. Code is in the contrib section of zlib.
http://zlib.net/
nanosvg
Lightweight SVG library.
https://github.com/memononen/nanosvg
ncurses hexedit
Curses based hex editor.
http://www.rogoyski.com/adam/programs/hexedit/
nemini
Lightweight SDL2 based Gemini client.
https://github.com/neonmoe/nemini
BSD patch
BSD fork of the patch program. I have a fork of this as well with some portability additions to better handle carriage return/line feed issues.
https://github.com/openbsd/src/tree/master/usr.bin/patch
pdfconcat
Concatenates PDF files.
https://github.com/pts/pdfconcat
pdftxt
Convert PDF to text. Helpful for searching PDFs with grep.
https://litcave.rudi.ir/
pdlzip
Compression/decompression for lzma format compatible with the lzip data compressor.
https://www.nongnu.org/lzip/pdlzip.html
picaxo
Graphics viewer.
http://gigi.nullneuron.net/comp/picaxo/
pkgconf
Drop in replacement for pkg-config with no circular dependencies.
https://github.com/pkgconf/pkgconf
pspg
Postgres pager provides a console based pager for PostgreSQL, MySQL, CSV and other formats. Uses ncurses (or pdcurses).
https://github.com/okbob/pspg
sbase
Efficient implementations of core base utilities.
https://core.suckless.org/sbase/
shot
Command line screenshot program.
https://github.com/rr-/shot/
sox
Sound exchange utility. Converts sound formats. Plays audio files.
http://sox.sourceforge.net/
stb
Public Domain single file header libraries. Includes stb_truetype.h, a lightweight alternative to the freetype library, which can parse, decode and rasterize characters from truetype fonts.
https://github.com/nothings/stb
TinyLZMA
Minimal LZMA compressor and decompressor.
https://github.com/WangXuan95/TinyLZMA
unarr
Decompression library for rar and other formats. Part of sumatrapdf project.
https://github.com/sumatrapdfreader/sumatrapdf/tree/master/ext/unarr
Standalone version of unarr.
https://github.com/selmf/unarr
x509cert
Generate x509 certificate requests. Works with BearSSL.
https://github.com/michaelforney/x509cert