musl libc

musl libc is a free, lightweight libc implementation intended for use on embedded systems. musl weighs in at 462kB for a full .a library (compared to glibc's 2MB), making musl an attractive option. (See the libc comparison data here)

If you need a complete libc implementation for your system, this is an excellent place to start.

I also frequently refer to it when I need to a reference implementation or a complete port a new libc function. musl is usually more accessible for function porting than Apple's open source libc, which relies on FreeBSD implementations and platform-specific assembly code.

musl libc does not always have the best implementations (e.g. memmove uses modulo operations), but most functions are implemented well.

You can find the musl libc source at git.musl-libc.org.

Happy hacking!

Further Reading