3 ms·
Doing it without glibc is not practical
by lionkor 3y ago
Doing it without glibc is not practical
- AndyKelley 3y agowhy?
- lionkor 3y agoBecause otherwise you need to implement almost everything yourself - memory allocation, input, output, etc. and anything more complex (like asking for the width of the terminal) requires you to get into Kernel structs, copy them out, translate, and basically copy paste glibc code anyways. And thats just linux.
- bruce_one 3y agoThere are alternative C libraries that are worth considering, e.g. Zig (which is what Bun itself is written in, afaiu) supports using [musl](https://musl.libc.org https://musl.libc.org) as an alternative to glibc, and musl can be statically linked as well (by contrast to the glibc quasi-static-linking).
- silverwind 3y agoIt's just DNS isn't it? Many apps don't even need DNS, so there should at least be an option to build fully static binaries.