Developer tools · c library
musl libc
Small C library that makes statically linked, portable Linux binaries easy to build and ship. Main caveat: its allocator and some functions run slower than glibc's.
Summarized from 80 comments.
Small C library that makes statically linked, portable Linux binaries easy to build and ship. Main caveat: its allocator and some functions run slower than glibc's.
- recommend
- 34
- criticize
- 25
- months recommended
- 10 of 13
Why people love it
Static binaries that run across distros · 7
command line tools are fine to link statically with MUSL, but as soon as you need a window and 3D rendering it's not worth the hassle
Jan 2026 · commentmusl + lua + c library + all lua codes can produce single static binary for linux which I utilize a lot
Oct 2026 · commentstatic linking against musl. Though beware that many things are slower in musl, such as the allocator.
Jul 2026 · commentIndependent of glibc version · 4
MUSL is a better libc for companies making proprietary binaries
Mar 2026 · commentbeing independent of the distros glibc version
Aug 2026 · commentwithout having to deal with glibc hell
Aug 2026 · commentSmaller binaries and lower memory · 3
Rust binaries have been substantially smaller on musl than standard dynamic linking to glibc
Aug 2026 · commentI have noticed that for the stuff I write it appears to have a lower memory footprint
Aug 2026 · commentmusl will fit into memory and glibc won't
Aug 2026 · commentEasy to set up · 3
it sounds like quite a reasonable price one might choose to pay for the convenience musl offers
Aug 2026 · commentIt's fantastic. Relatively easy to set up
Jan 2026 · commentmusl is by far the easiest way to do that
Aug 2026 · comment
What people warn about
Slower, especially the allocator · 10
Maybe one could complain that musl is using an inferior allocator that is freeing then immediately reallocating the same address.
Aug 2026 · commentIt's just a reality that musl is measurably worse at multiple threads allocating even in very polite conditions
Aug 2026 · commentmusl without mimalloc has a 144% overhead, so most of the performance issues do indeed come from the allocator
Aug 2026 · commentOdd DNS and NSS behavior · 3
especially around MUSL libc which I have had cause many strange downstream issues over the years
May 2026 · commentmusl libc's DNS resolver, which can behave differently (thus confusingly) than glibc's
Jun 2026 · commentyou 100% need a systemd distro to get away from nss complexities that musl introduces
Jun 2026 · commentStatic linking compatibility not reliable · 2
it did not function properly because the library I loaded still depended on libc functions
Jan 2026 · commentall the talk of statically linking with musl to get such type of compatibility is bullshit
Jan 2026 · comment
What hackers pick instead
- glibcFree C library praised for strong ABI stability and backward compatibility; critics say its design decisions and versioned symbols hurt portability.29recommend
- Cosmopolitan libcBuilds single binaries that run across Linux, Windows and Mac on amd64 and arm64, with a portable C library. Caveat: critics note limited adoption and lowest-common-denominator platform support issues.29recommend
- Sp.h standard library for CA single-header-style C standard library replacement that people praise for its opinionated, self-contained design and portability, though critics find its implementation quality and performance uneven.11recommend
- GLibC utility library offering automatic resource management and basic data structures; critics find its design odd and its abstractions unsafe.6recommend
- Lib0xcFree C library of safer systems APIs that people say can make existing C code safer, with bounds safety where possible. Caveat: it doesn't support MSVC or Windows.6recommend
Every quote
The 40 most detailed of 80 comments. Each links to the original.
command line tools are fine to link statically with MUSL, but as soon as you need a window and 3D rendering it's not worth the hassle
Mixed · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”
Maybe one could complain that musl is using an inferior allocator that is freeing then immediately reallocating the same address.
Mixed · Aug 2026 · in “RipGrep musl binaries occasionally segfault during very-large searches”
musl + lua + c library + all lua codes can produce single static binary for linux which I utilize a lot
Recommends · Oct 2026 · in “Teal – A statically-typed dialect of Lua”
static linking against musl. Though beware that many things are slower in musl, such as the allocator.
Mixed · Jul 2026 · in “Linux kernel will support $ORIGIN, sort of”
it sounds like quite a reasonable price one might choose to pay for the convenience musl offers
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
Rust binaries have been substantially smaller on musl than standard dynamic linking to glibc
Mixed · Aug 2026 · in “Don't use musl if you care about performance”
musl libc's DNS resolver, which can behave differently (thus confusingly) than glibc's
Mixed · Jun 2026 · in “Alpine Linux 3.24.0 Released”
you 100% need a systemd distro to get away from nss complexities that musl introduces
Mixed · Jun 2026 · in “Is it time for a new Embedded Linux build system?”
I have noticed that for the stuff I write it appears to have a lower memory footprint
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
MUSL is a better libc for companies making proprietary binaries
Recommends · Mar 2026 · in “Wine 11 rewrites how Linux runs Windows games at kernel with massive speed gains”
I compile static binaries with musl. I do not use glibc
Recommends · Jan 2026 · in “What came first: the CNAME or the A record?”
it does let you have very cross-Linux portable binaries
Recommends · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”
being independent of the distros glibc version
Mixed · Aug 2026 · in “Don't use musl if you care about performance”
You can make it statically linked using musl.
Recommends · May 2026 · in “Just Fucking Use Go”
It's fantastic. Relatively easy to set up
Recommends · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”
musl is by far the easiest way to do that
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
musl will fit into memory and glibc won't
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
without having to deal with glibc hell
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
I use musl instead of glibc
Recommends · Jan 2026 · in “What came first: the CNAME or the A record?”
It's just a reality that musl is measurably worse at multiple threads allocating even in very polite conditions
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
musl without mimalloc has a 144% overhead, so most of the performance issues do indeed come from the allocator
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
26% slower could turn into a huge hardware bill, and could render the library unusable for some purposes
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
trading an app running 26% slower, to save a dozen megabytes ? that sounds positively insane to me
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
especially around MUSL libc which I have had cause many strange downstream issues over the years
Criticizes · May 2026 · in “OpenBSD 7.9 Released”
if it's not the fastest library then it will necessarily be unsuitable for some applications
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
people keep relearning this lesson the hard way when they link musl and suffer perf issues
Criticizes · May 2026 · in “Sp.h is the standard library that C deserves”
it did not function properly because the library I loaded still depended on libc functions
Criticizes · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”
all the talk of statically linking with musl to get such type of compatibility is bullshit
Criticizes · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”
the slowdown is coming from (probably) slow musl implementations of memcpy/memset
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
The very first benchmark presented shows a 26% regression using musl + mimalloc
Criticizes · Aug 2026 · in “Don't use musl if you care about performance”
I use musl and I care a lot about performance. It doesn't matter because has no bearing on how fast my programs are.
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
My point is the musl is useful and the disadvantages are easy to work around.
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
the vast majority of software works perfectly or near perfectly on musl libc
Recommends · Dec 2025 · in “Go is portable, until it isn't”
the problem is that it has surfaced in a performance application using musl
Mixed · Aug 2026 · in “RipGrep musl binaries occasionally segfault during very-large searches”
It's unlikely that musl prevents anyone from making a fast program.
Recommends · Aug 2026 · in “Don't use musl if you care about performance”
I dont know if a static musl build would even work for that either
Mixed · Aug 2026 · in “Don't use musl if you care about performance”
I have plenty of Disk Space, you can ship glibc based container
Mixed · Aug 2026 · in “Don't use musl if you care about performance”
Most of musl's performance issues come from their allocator.
Mixed · Aug 2026 · in “Don't use musl if you care about performance”
the easier approach is to just go for musl all the way
Recommends · Dec 2025 · in “Go is portable, until it isn't”
This helps clean up a lot of stuff that I got wrong.
Recommends · May 2026 · in “C extensions, portability, and alternative compilers”
Counts from 1,795,640 Hacker News comments, Nov 2025 to Nov 2026. How we count · Report a mistake