Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Here's one person trying to reduce binary bloat, while there's also a push to statically link everything. Who will win?

Alos, don't go rearranging the members of your structs if they're made public to third-parties!



> while there's also a push to statically link everything

could you elaborate? who is pushing and what?

dynamic linking has it pitfalls, often it's a pain, but it has big big profits as well.


> > while there's also a push to statically link everything

> could you elaborate? who is pushing and what?

I don't know of a more general movement, but Go developers seem very eager/proud about the single-binary thing. It can make deployments, particularly updates, much less issue prone.


Well, if you're deploying in a container where the only useful userspace program is your http server web API, embedding the whole clib and cpplib just for a few functions, it is smaller and simpler to deploy to use static linking.


Aye, a container with the binary and the right versions of the supporting libraries is essentially static linking with extra steps.

Containers offer some tooling for resource management and such, though that is basically wrappers and other syntactic sugar dressing up OS facilities like resource groups so isn't anything you can't do with a statically linked binary too.


And dynamic libraries can be prelinked to regain some performance: https://linux.die.net/man/8/prelink




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: