musl

Developer(s)| Rich Felker (dalias) and others
Initial release| February 11, 2011; 15 years ago (2011-02-11)[1]
Stable release|

1.2.6[2] / March 20, 2026; 50 days ago (2026-03-20)

Operating system| Linux 2.6 or later
Platform| x86, x86 64, ARM, loongarch64, MIPS, Microblaze, PowerPC, powerpc64, x32, RISC-V, OpenRISC, s390x, SuperH
Type|

* C standard library
* Linux for embedded systems
* Linux for mobile devices

License| MIT License
Website| musl.libc.org

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]

## Contents

* 1 Overview
* 2 See also
* 3 References
* 4 External links

## 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.[5] There is partial ABI compatibility with the part of glibc required by Linux Standard Base.Cite error: Closing `</ref>` missing for `<ref>` tag 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."Cite error: Closing `</ref>` missing for `<ref>` tag

* Dragora 3[6]
* Gentoo Linux (glibc by default, musl can be chosen at install time)[7]
* OpenWrt[8]
* postmarketOS[9]
* Sabotage[10]
* Adélie Linux
* Morpheus Linux[11]
* Chimera Linux[12]
* Void Linux[13]
* KISS Linux

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

A modified musl wrapper is also utilized written for OpenHarmony distributed operating systems within its userspace for its standard system devices; while it primarily targets a Linux kernel, it employs a Kernel Abstraction Layer (KAL) to map extended POSIX system calls when running on non-Linux kernels of kernel agnostic core system, such as microkernel-based HarmonyOS's HongMeng Kernel Linux ABI compliant shim for POSIX-like functionalities.[15]

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

## See also

* Bionic libc
* dietlibc
* EGLIBC
* klibc
* Newlib
* uClibc

## References

1. ↑ "musl - obsolete versions". 2017-10-31. https://www.musl-libc.org/oldversions.html. >
2. ↑ Cite error: Invalid `<ref>` tag; no text was provided for refs named `RELEASES`
3. ↑ Rich Felker (2016-04-29). "COPYRIGHT". https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT.
4. ↑ 4.0 4.1 "Introduction to musl". 2016-04-21. https://www.musl-libc.org/intro.html.
5. ↑ "Compatibility". 2014-05-27. http://wiki.musl-libc.org/wiki/Compatibility.
6. ↑ Larabel, Michael (30 September 2018). "Dragora 3.0 Alpha 2 Released As One Of The Libre GNU/Linux Platforms". Phoronix Media. https://www.phoronix.com/scan.php?page=news_item&px=Dragora-3.0-Alpha-2.
7. ↑ "Additional stage downloads for amd64, ppc, x86, arm available". 20 July 2021. https://www.gentoo.org/news/2021/07/20/more-downloads.html.
8. ↑ Fietkau, Felix (16 Jun 2015). "OpenWrt switches to musl by default". http://permalink.gmane.org/gmane.comp.embedded.openwrt.devel/32651.
9. ↑ "About postmarketOS - postmarketOS Wiki". https://wiki.postmarketos.org/wiki/About_postmarketOS.
10. ↑ on GitHub
11. ↑ "morpheus". https://morpheus.2f30.org/.
12. ↑ "Chimera Linux - About" (in en). https://chimera-linux.org/about/#alternative-userland.
13. ↑ "Enter the void". https://voidlinux.org/.
14. ↑ seL4/musllibc, seL4 microkernel and related repositories, 2020-08-30, https://github.com/seL4/musllibc, retrieved 2020-09-05
15. ↑ "A first look at app security on HarmonyOS NEXT" (in en). https://promon.io/security-news/harmonyos-next.
16. ↑ "Adélie Linux / gcompat" (in en). https://code.foxkit.us/adelie/gcompat.
17. ↑ "Manoel-linux-gitlab / GlibMus-HQ · GitLab". https://gitlab.com/manoel-linux1/GlibMus-HQ.

## External links

* Official website
* Comparison of C/POSIX standard library implementations for Linux
* Matrix of C/POSIX standard libraries by architecture
* Project:Musl on Gentoo wiki

* v
* t
* e

C programming language

* ANSI C
* C89 and C90
* C99
* C11
* C18
* C2x
* Embedded C
* MISRA C

Features|

* Functions
* Header files
* Libraries
* Operators
* String
* Syntax
* Preprocessor
* Data types

Standard library
functions|

* Char (ctype.h)
* File I/O (stdio.h)
* Math (math.h)
* Dynamic memory (stdlib.h)
* String (string.h)
* Time (time.h)
* Variadic (stdarg.h)
* POSIX

Standard
libraries|

* Bionic
* libhybris
* dietlibc
* EGLIBC
* glibc
* klibc
* Microsoft Run-time Library
* musl
* Newlib
* uClibc
* BSD libc

Compilers|

* Comparison of compilers
* ACK
* Borland Turbo C
* Clang
* GCC
* ICC
* LCC
* PCC
* SDCC
* TCC
* Microsoft Visual Studio / Express / C++
* Watcom C/C++

IDEs|

* Comparison of IDEs
* Anjuta
* Code
* CodeLite
* Eclipse
* Geany
* Microsoft Visual Studio
* NetBeans

Comparison with
other languages|

* Compatibility of C and C++
* Comparison with Embedded C
* Comparison with Pascal
* Comparison of programming languages

Descendant
languages|

* C++
* C#
* D
* Objective-C
* Alef
* Limbo
* Go
* Vala

* Category

0.00

(0 votes)

Original source: https://en.wikipedia.org/wiki/Musl. Read more

|

Retrieved from "https://handwiki.org/wiki/index.php?title=Software:Musl&oldid=4292662"
*[v]: View this template
*[t]: Discuss this template
*[e]: Edit this template