musl
{{Short description|Implementation of C standard library for Linux operating system}}
{{For|the American lottery organization MUSL|Multi-State Lottery Association}}
{{Lowercase title}}
{{Infobox software
| name = musl
| logo = Musl libc.svg
| developer = Rich Felker (dalias) and others
| released = {{Start date and years ago|2011|02|11}}{{cite web
| title=musl - obsolete versions
| url=https://www.musl-libc.org/oldversions.html
| website=musl-libc.org
| date=2017-10-31
| access-date=2018-01-14}}{{cbignore}}>
| latest release version = 1.2.5{{r|RELEASES}}
| latest release date = {{Start date and age|2024|02|29}}
| operating system = Linux 2.6 or later
| platform = x86, x86_64, ARM, loongarch64, MIPS, Microblaze, PowerPC, powerpc64, x32, RISC-V, OpenRISC, s390x, SuperH
| genre = {{unbulleted list|C standard library|Linux for embedded systems|Linux for mobile devices}}
| license = MIT License
| website = {{url|https://musl.libc.org|musl.libc.org}}
}}
musl is a C standard library intended for operating systems based on the Linux kernel, released under the MIT License.{{cite web|url=https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT|archive-url=https://ghostarchive.org/archive/20211016/https://git.musl-libc.org/cgit/musl/tree/COPYRIGHT|archive-date=2021-10-16|title=COPYRIGHT|author=Rich Felker|display-authors=etal|date=2016-04-29|access-date=2016-09-26|url-status=live}}{{cbignore}} It was developed by Rich Felker to write a clean, efficient, and standards-conformant libc implementation.
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.{{cite web|url=https://www.musl-libc.org/intro.html|archive-url=https://ghostarchive.org/archive/20211016/https://www.musl-libc.org/intro.html|archive-date=2021-10-16|title=Introduction to musl|date=2016-04-21|access-date=2016-09-26|url-status=live}}{{cbignore}} 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.{{cite web|url=http://wiki.musl-libc.org/wiki/Compatibility|archive-url=https://ghostarchive.org/archive/20211016/http://wiki.musl-libc.org/wiki/Compatibility|archive-date=2021-10-16|title=Compatibility|website=wiki.musl-libc.org|date=2014-05-27|access-date=2016-09-26|url-status=live}}{{cbignore}} There is partial ABI compatibility with the part of glibc required by Linux Standard Base.{{cite web|title=Comparison of C/POSIX standard library implementations for Linux|url=http://www.etalabs.net/compare_libcs.html|archive-url=https://ghostarchive.org/archive/20211016/http://www.etalabs.net/compare_libcs.html|archive-date=2021-10-16|website=www.etalabs.net|url-status=live}}{{cbignore}}
Version 1.2.0 has support for (no longer current) Unicode 12.1.0 (while still having full UTF-8 support,{{Cite web|title=musl libc - Functional differences from glibc|url=https://wiki.musl-libc.org/functional-differences-from-glibc.html| archive-url=https://ghostarchive.org/archive/20211016/https://wiki.musl-libc.org/functional-differences-from-glibc.html| archive-date=2021-10-16|access-date=2020-08-13|website=wiki.musl-libc.org|url-status=live}}{{cbignore}} 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 web|title=musl libc Release History|url=https://musl.libc.org/releases.html|archive-url=https://ghostarchive.org/archive/20211016/https://musl.libc.org/releases.html|archive-date=2021-10-16|access-date=2020-08-13|website=musl.libc.org|url-status=live}}{{cbignore}}
Use
Linux distributions which use musl as their standard C library (some use only musl) include but are not limited to:
- Alpine Linux{{cite web |title=About |url=https://alpinelinux.org/about/ |website=Alpine Linux |access-date=18 June 2022}}
- Dragora 3{{cite web |last1=Larabel |first1=Michael |title=Dragora 3.0 Alpha 2 Released As One Of The Libre GNU/Linux Platforms |url=https://www.phoronix.com/scan.php?page=news_item&px=Dragora-3.0-Alpha-2 |website=Phoronix |publisher=Phoronix Media |access-date=18 June 2022 |date=30 September 2018}}
- Gentoo Linux (glibc by default, musl can be chosen at install time){{cite web |author1=Gentoo Authors |title=Additional stage downloads for amd64, ppc, x86, arm available |url=https://www.gentoo.org/news/2021/07/20/more-downloads.html |website=Gentoo Linux |access-date=18 June 2022 |date=20 July 2021}}
- OpenWrt{{cite web |last1=Fietkau |first1=Felix |title=OpenWrt switches to musl by default |url=http://permalink.gmane.org/gmane.comp.embedded.openwrt.devel/32651 |archive-url=https://web.archive.org/web/20150728003734/http://permalink.gmane.org/gmane.comp.embedded.openwrt.devel/32651 |archive-date=28 July 2015 |date=16 Jun 2015}}
- postmarketOS{{Cite web |title=About postmarketOS - postmarketOS Wiki |url=https://wiki.postmarketos.org/wiki/About_postmarketOS |access-date=2024-08-07 |website=wiki.postmarketos.org}}
- Sabotage{{Github|sabotage-linux/sabotage/blob/master/README.md}}
- Morpheus Linux{{cite web|url=https://morpheus.2f30.org/|archive-url=https://ghostarchive.org/archive/20211016/https://morpheus.2f30.org/|archive-date=2021-10-16|title=morpheus|access-date=2018-06-15}}{{cbignore}}
- Chimera Linux{{Cite web |title=Chimera Linux - About |url=https://chimera-linux.org/about/#alternative-userland |access-date=2023-05-10 |website=Chimera Linux |language=en}}
- Void Linux{{cite web |title=Enter the void |url=https://voidlinux.org/ |website=Void Linux |access-date=18 June 2022}}
The seL4 microkernel{{Citation|title=seL4/musllibc|date=2020-08-30|url=https://github.com/seL4/musllibc|archive-url=https://ghostarchive.org/archive/20211016/https://github.com/seL4/musllibc|archive-date=2021-10-16|publisher=seL4 microkernel and related repositories|access-date=2020-09-05|url-status=live}}{{cbignore}} ships with musl.
For binaries that have been linked against glibc, gcompat,{{Cite web|url=https://code.foxkit.us/adelie/gcompat| archive-url=https://ghostarchive.org/archive/20211016/https://code.foxkit.us/adelie/gcompat| archive-date=2021-10-16|title=Adélie Linux / gcompat|website=GitLab|language=en|access-date=2019-10-21|url-status=live}}{{cbignore}} glibmus-hq.{{cite web | url=https://gitlab.com/manoel-linux1/GlibMus-HQ | title=Manoel-linux-gitlab / GlibMus-HQ · GitLab }} can be used to execute them on musl-based distros.
See also
References
{{Reflist|30em}}
External links
- {{Official website|https://musl.libc.org/}}
- [https://www.etalabs.net/compare_libcs.html Comparison of C/POSIX standard library implementations for Linux]
- [https://web.archive.org/web/20161106192843/http://uclibc-ng.org/wiki/matrix Matrix of C/POSIX standard libraries by architecture]
- [https://wiki.gentoo.org/wiki/Project:Musl Project:Musl on Gentoo wiki]
{{CProLang}}
Category:Free computer libraries
Category:Free software programmed in C