Skip to content

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 · comment

    musl + lua + c library + all lua codes can produce single static binary for linux which I utilize a lot

    Oct 2026 · comment

    static linking against musl. Though beware that many things are slower in musl, such as the allocator.

    Jul 2026 · comment
  • Independent of glibc version · 4

    MUSL is a better libc for companies making proprietary binaries

    Mar 2026 · comment

    being independent of the distros glibc version

    Aug 2026 · comment

    without having to deal with glibc hell

    Aug 2026 · comment
  • Smaller binaries and lower memory · 3

    Rust binaries have been substantially smaller on musl than standard dynamic linking to glibc

    Aug 2026 · comment

    I have noticed that for the stuff I write it appears to have a lower memory footprint

    Aug 2026 · comment

    musl will fit into memory and glibc won't

    Aug 2026 · comment
  • Easy to set up · 3

    it sounds like quite a reasonable price one might choose to pay for the convenience musl offers

    Aug 2026 · comment

    It's fantastic. Relatively easy to set up

    Jan 2026 · comment

    musl 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 · comment

    It's just a reality that musl is measurably worse at multiple threads allocating even in very polite conditions

    Aug 2026 · comment

    musl without mimalloc has a 144% overhead, so most of the performance issues do indeed come from the allocator

    Aug 2026 · comment
  • Odd DNS and NSS behavior · 3

    especially around MUSL libc which I have had cause many strange downstream issues over the years

    May 2026 · comment

    musl libc's DNS resolver, which can behave differently (thus confusingly) than glibc's

    Jun 2026 · comment

    you 100% need a systemd distro to get away from nss complexities that musl introduces

    Jun 2026 · comment
  • Static linking compatibility not reliable · 2

    it did not function properly because the library I loaded still depended on libc functions

    Jan 2026 · comment

    all the talk of statically linking with musl to get such type of compatibility is bullshit

    Jan 2026 · comment

What hackers pick instead

Every quote

The 40 most detailed of 80 comments. Each links to the original.

  1. 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”

  2. 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”

  3. 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”

  4. 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”

  5. 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”

  6. 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”

  7. musl libc's DNS resolver, which can behave differently (thus confusingly) than glibc's

    Mixed · Jun 2026 · in “Alpine Linux 3.24.0 Released”

  8. 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?”

  9. 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”

  10. 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”

  11. I compile static binaries with musl. I do not use glibc

    Recommends · Jan 2026 · in “What came first: the CNAME or the A record?”

  12. it does let you have very cross-Linux portable binaries

    Recommends · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”

  13. being independent of the distros glibc version

    Mixed · Aug 2026 · in “Don't use musl if you care about performance”

  14. You can make it statically linked using musl.

    Recommends · May 2026 · in “Just Fucking Use Go”

  15. It's fantastic. Relatively easy to set up

    Recommends · Jan 2026 · in “The Holy Grail of Linux Binary Compatibility: Musl and Dlopen”

  16. musl is by far the easiest way to do that

    Recommends · Aug 2026 · in “Don't use musl if you care about performance”

  17. musl will fit into memory and glibc won't

    Recommends · Aug 2026 · in “Don't use musl if you care about performance”

  18. without having to deal with glibc hell

    Recommends · Aug 2026 · in “Don't use musl if you care about performance”

  19. I use musl instead of glibc

    Recommends · Jan 2026 · in “What came first: the CNAME or the A record?”

  20. 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”

  21. 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”

  22. 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”

  23. 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”

  24. especially around MUSL libc which I have had cause many strange downstream issues over the years

    Criticizes · May 2026 · in “OpenBSD 7.9 Released”

  25. 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”

  26. 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”

  27. 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”

  28. 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”

  29. 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”

  30. 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”

  31. 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”

  32. 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”

  33. the vast majority of software works perfectly or near perfectly on musl libc

    Recommends · Dec 2025 · in “Go is portable, until it isn't”

  34. 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”

  35. 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”

  36. 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”

  37. 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”

  38. Most of musl's performance issues come from their allocator.

    Mixed · Aug 2026 · in “Don't use musl if you care about performance”

  39. the easier approach is to just go for musl all the way

    Recommends · Dec 2025 · in “Go is portable, until it isn't”

  40. 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