musl
Lightweight, standards-conforming C standard library for Linux, an alternative to glibc.
Liked for building statically linked, self-contained binaries123 and minimal Linux systems as a simpler replacement for glibc.4567 The most common caveat is its slow default malloc, which several commenters replace with mimalloc8910, along with not being the fastest C library.11
Why people recommend it
Static linking · 3
Commenters use it to build fully static, self-contained binaries and userlands.
“Otherwise the entire userland is statically-linked”
“drops the GNU C library for the musl C library, which is more minimal and better optimized for static builds of packages”
Show 1 more
“I use musl for compiling self contained Nim utilities I use on containers and servers without having to deal with glibc hell.”
Glibc alternative · 3
Used in place of glibc, including to avoid glibc dependency problems.
“I use musl instead of glibc”
“I use musl for compiling self contained Nim utilities I use on containers and servers without having to deal with glibc hell.”
Show 1 more
“drops the GNU C library for the musl C library, which is more minimal and better optimized for static builds of packages”
Minimalism · 2
Valued for being more minimal and simpler than glibc.
“drops the GNU C library for the musl C library, which is more minimal and better optimized for static builds of packages”
“I genuinely prefer musl for this”
Production distros · 2
Whole Linux distributions and production operating systems are built on it.
“We use musl+mimalloc by default for our entire production operating systems”
“Our entire linux distro is musl based”
Memory footprint · 1
One Rust developer sees lower memory use for IO-bound programs.
“I use musl for my Rust stuff because I have noticed that for the stuff I write it appears to have a lower memory footprint”
Caveats and dissent
Slow malloc · 3
The default allocator is described as slow or a placeholder, so users swap in mimalloc.
“Our entire linux distro is musl based”
“I use musl for my Rust stuff because I have noticed that for the stuff I write it appears to have a lower memory footprint”
Show 1 more
“We use musl+mimalloc by default for our entire production operating systems”
Performance · 1
One commenter says it is not the fastest C library for performance-sensitive work.
“If you do use MUSL then you aren't using the fastest library, so you must not care that much about performance.”
Compatibility · 1
Some large programs still won't compile with musl and need a glibc chroot.
“Otherwise the entire userland is statically-linked”
Often compared with
Who recommends it in their own words
Threads where it came up
- Don't use musl if you care about performance 5 mentions
- The Problem of System Communication 1 mention
- Invelinux – An independent, RAM-based Linux distribution using Toybox and musl 1 mention
- RipGrep musl binaries occasionally segfault during very-large searches 1 mention
- What came first: the CNAME or the A record? 1 mention
- item 45794280 1 mention
Data: musl.json. Quotes are verbatim; the verdict and theme labels are written by a model from these comments, and every clause links to its sources.
All comments 10
“Otherwise the entire userland is statically-linked”
“If you do use MUSL then you aren't using the fastest library, so you must not care that much about performance.”
“Show me where musl prevents someone from writing a fast program.”
“Our entire linux distro is musl based”
“I use musl for my Rust stuff because I have noticed that for the stuff I write it appears to have a lower memory footprint”
“I use musl for compiling self contained Nim utilities I use on containers and servers without having to deal with glibc hell.”
“drops the GNU C library for the musl C library, which is more minimal and better optimized for static builds of packages”
“We use musl+mimalloc by default for our entire production operating systems”
“I use musl instead of glibc”
“I genuinely prefer musl for this”