Wikiwand AI

Musl

Implementation of C standard library for Linux operating system From Wikipedia, the free encyclopedia

musl is a C standard library intended for operating systems based on the Linux kernel, released under the MIT License.[3] It was developed by Rich Felker to write a clean, efficient, and standards-conformant libc implementation.[4] Unlike glibc’s LGPL, musl’s MIT licence does not require distributors of statically linked applications to provide relinkable object files.[5]

DevelopersRich Felker (dalias) and others
ReleaseFebruary 11, 2011; 15 years ago (2011-02-11)[1]
Stable release
1.2.6[2] / March 20, 2026; 6 months ago (2026-03-20)
Quick facts Developers, Release ...
musl
DevelopersRich Felker (dalias) and others
ReleaseFebruary 11, 2011; 15 years ago (2011-02-11)[1]
Stable release
1.2.6[2] / March 20, 2026; 6 months ago (2026-03-20)
Operating systemLinux 2.6 or later
Platformx86, x86_64, ARM, loongarch64, MIPS, Microblaze, PowerPC, powerpc64, x32, RISC-V, OpenRISC, s390x, SuperH
Type
LicenseMIT License
Websitemusl.libc.org
Repository
Close

Overview

musl was designed from scratch to allow efficient static linking and to have realtime-quality robustness by avoiding race conditions, internal failures on resource exhaustion, and various other bad worst-case behaviors present in existing implementations.[4] The dynamic runtime is a single file with stable ABI allowing race-free updates and the static linking support allows an application to be deployed as a single portable binary without significant size overhead.

It claims compatibility with the POSIX 2008 specification and the C11 standard. It also implements most of the widely used non-standard Linux, BSD, and glibc functions.[6] There is partial ABI compatibility with the part of glibc required by Linux Standard Base.[7]

Version 1.2.0 has support for (no longer current) Unicode 12.1.0 (while still having full UTF-8 support,[8] more conformant/strict than glibc), and version 1.2.1 "features the new 'mallocng' malloc implementation, replacing musl's original dlmalloc-like allocator that suffered from fundamental design problems."[2]

Use

Linux distributions which use musl as their standard C library (some use only musl) include but are not limited to:

A modified version of musl is available for userspace code written for the seL4 microkernel[18], requiring users to implement the parts of the Linux system call interface that the subset of musl they wish to use depends on.

Huawei's HarmonyOS NEXT operating system uses a fork of musl as its libc implementation.[19]

For binaries that have been linked against glibc, gcompat and[20] glibmus-hq[21] can be used to execute them on musl-based distros.

See also

References

Sources

Related Articles

Timelines

Top Qs

Fact Checks