diet libc - a libc optimized for small size

[Other pages for this project: freshmeat, advogato, linuxtv, gnu.org]

Person who say it cannot be done should not interrupt person doing it. --Chinese Proverb

What is it?

The diet libc is a libc that is optimized for small size. It can be used to create small statically linked binaries for Linux on alpha, arm, hppa, ia64, i386, mips, s390, sparc, sparc64, ppc and x86_64. This repository contains several ready-to-use binaries that were linked against the diet libc.

The latest version is always available via anonymous CVS (which is the recommended way to get the sources):

$ cvs -d :pserver:cvs@cvs.fefe.de:/cvs -z9 co dietlibc
There is a mailing list for the diet libc. You can subscribe by sending an empty email to dietlibc-subscribe@fefe.de; it is run by ezmlm. There is an archive of precompiled binaries at foobar.math.fu-berlin.de. Please read the FAQ if you have any questions.

The diet libc would not be possible without the many many contributors. To acknowledge their work, I created this scoreboard.

Recent News

[20130312] dietlibc-0.33 [GPG sig] has been released (no diff this time). Here are the changes.

[20090529] dietlibc-0.32 [GPG sig] (diff from 0.31 [GPG sig]) has been released. Here are the changes.

[20070824] dietlibc-0.31 [GPG sig] (diff from 0.30 [GPG sig]) has been released. Here are the changes.

[20060621] dietlibc-0.30 [GPG sig] (diff from 0.29 [GPG sig]) has been released. Here are the changes.

[20050520] dietlibc-0.29 [GPG sig] (diff from 0.28 [GPG sig]) has been released. Here are the changes.

[20050131] dietlibc-0.28 [GPG sig] (diff from 0.27 [GPG sig]) has been released. Here are the changes.

[20040729] dietlibc-0.27 [GPG sig] (diff from 0.26 [GPG sig]) has been released. Here are the changes.

[20040603] dietlibc-0.26 [GPG sig] (diff from 0.25 [GPG sig]) has been released. Here are the changes.

[20040327] dietlibc-0.25 [GPG sig] (diff from 0.24 [GPG sig]) has been released. Here are the changes.

[20031205] Made a Credits Scoreboard where I give points to everyone helping with the diet libc.

[20031121] dietlibc-0.24 [GPG sig] (diff from 0.23 [GPG sig]) has been released. Here are the changes.

[20030912] dietlibc-0.23 [GPG sig] (diff from 0.22 [GPG sig]) has been released. Here are the changes.

[20030218] dietlibc-0.22 [GPG sig] (diff from 0.21) has been released. Here are the changes.

[20021004] dietlibc-0.21 [GPG sig] (diff from 0.20) has been released. Here are the changes.

[20020810] dietlibc-0.20 (diff from 0.19) has been released. Here are the changes.

[20020805] dietlibc-0.19 (diff from 0.18) has been released. Here are the changes. This release contains security fixes!

[20020710] dietlibc-0.18 (diff from 0.17) has been released. Here are the changes.

[20020503] dietlibc-0.17 (diff from 0.16) has been released. Here are the changes.

[20020322] dietlibc-0.16 (diff from 0.15) has been released. Here are the changes.

[20020221] dietlibc-0.15 (diff from 0.14) has been released. Here are the changes.

[20020129] dietlibc-0.14 (diff from 0.13) has been released. Here are the changes.

[20020112] The diet libc is now hosted at your local ftp.kernel.org mirror, in /pub/linux/libs/dietlibc (please give it a little time to propagate). Thanks, HPA!

[20020111] Thomas Ogrisegg unceremoniously sent me a few patches to port the diet libc to HP's PA-RISC architecture! Hooray!

[20020109] dietlibc-0.13 (diff from 0.12) has been released. Here are the changes. I also updated the FAQ.

[oldnews]

Documentation

The diet libc does not contain man pages yet. I recommend using the Single Unix Specification or the Linux man pages. Please do read the Frequently Asked Questions (with answers) list if you have any question! Or you can read slides from my talk at Linux Kongress 2001 or at Chemnitzer Linux Tag 4 (and previously Chaos Communication Congress 2001, same contents but in German).

Writing Small Software (German version held at Chemnitzer Linux Tag 4).

What does dietlibc include?

Here is a list of the exported symbols.

Licensing terms?

The diet libc is covered by the GNU General Public License Version 2. Other licensing terms (e.g. for commercial projects) can be negotiated for substantial contributors or project sponsors.

See also

  1. DietLinux! A boot floppy based on the diet libc (see also this directory
  2. Fabrice Bellard's Tiny C Compiler. You can't compile the diet libc with it.
  3. Olaf's patches
  4. the libdjb project and the libowfat project
  5. ugrep by Jens Lass, a mini grep of 11k!
  6. small utils (dd, cat, touch, cp, rm and mv using diet libc, no bloat, no features except the bare minimum ;-})
  7. The ELKS project's libc is very lean, too.
  8. shi-sh, a small shell using libowfat and dietlibc (link broken)
  9. LZMA utils in C (the regular ones are in C++ and thus do not work with dietlibc)
  10. fgetty, a very small getty
  11. fget, a very small http/ftp fetcher
  12. my ncp rewrite using libdjb. This is my first program using libdjb and it was the testing ground for dietlibc.
  13. my embedded utils project, a collection of popular class utilities like mkdir and echo, targeted specifically at diet libc and small size.
  14. A small sed for diet libc.
  15. The heirloom project aims to port the original Unix userland to modern Unixes. Very cool project, although it only works partially with the diet libc until I finally add wide char routines.
  16. uclibc.org hosts another open source project called "uClibc" that seems to be quite close to dietlibc.
  17. trio. trio aims to be a portable and complete scanf and printf implementation. If the diet libc implementation misses a feature that you need, you might want to look at trio.
  18. www.linuxassembly.org is also interested in small programs, but they are limiting themselves to x86.
  19. libsys by Rick Hohensee.
  20. The PowerPC EMbedded Systems HOWTO and the Linux Assembly HOWTO may both be relevant.
  21. The e3 editor is an impressively small editor. It has an x86 assembly version and a C version that works just fine with the diet libc.
  22. dnetc linux is a floppy linux using the diet libc.
  23. Pauls Boot CD uses the diet libc for linuxrc.
  24. sw-ports links many packages with the diet libc.
  25. fdlibm, a free math library
  26. xyssl, a small ssl library (client-side only, ~100k, APIs not openssl compatible)