Zeptolibc, a few C standard library functions in a trenchcoat claiming to be a libc

For several projects, I’ve needed to pull in chunks of existing C code and have lately found myself copy pasting zig wrappers for missing C library functions.

Most things I’m working on are wasm or embedded, both of which are freestanding/baremetal targets without a proper system libc to link to.

As I only really want malloc(), printf() and a handful of utility functions I’ve wrapped them up into a library which can be used as a module dependency.

I hope it will save someone else the pain of doing the same.

(Many functions taken from ziglibc)

6 Likes