Stream: platform development

Topic: musl for libc choice


view this post on Zulip Dries Frederickx (Mar 13 2025 at 15:47):

Hello everyone!
I might not be the most tech literate and wanted to ask (if not inconvenient) how musl libc is a good portable choice instead of other options like cosmopolitan libc.
I wanted to ask this since I read on the Roc website that current builds are produced with glibc but that gates off other Linux ditros or OSes dat are not using glibc and how musl/cosmopolitan, ... can fix this.

Many thanks for the any reply and I whish you all luck with Roc.
I'll definitely be looking forward to any progression you guys make.

view this post on Zulip Brendan Hansknecht (Mar 13 2025 at 15:52):

The big difference for portability is that musl libc is statically compiled into the app. So Libc becomes contained inside the binary (no system dependency to use it). With glibc, it is dynamically linked and depends on the version on the system (which can dramatically vary from Linux distro and version). This make glibc undependable if you want something portable.

view this post on Zulip Brendan Hansknecht (Mar 13 2025 at 15:56):

I think cosmopolitan Libc is also fine, but not really needed. Generally speaking apps still have different configurations based on os internally. Unless you make all of those is agmostic as well, you still are stuck with a version of your app per os/arch. At that point, it is better to use what is more supported by an os than to use cosmopolitan. I'm also not sure of the production quality of cosmopolitan Libc.

view this post on Zulip Dries Frederickx (Mar 13 2025 at 16:02):

Many thanks for the answer!


Last updated: Jul 06 2025 at 12:14 UTC