Hacker News new | ask | show | jobs
by schemescape 1128 days ago
How big are the bundles (edit: I meant self-contained executables) and do they depend on glibc?

Edit: just saw a comment from the author indicating glibc is required.

1 comments

Doing it without glibc is not practical
It'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.
why?
Because 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.
There 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) as an alternative to glibc, and musl can be statically linked as well (by contrast to the glibc quasi-static-linking).