What is MUSL? What are the pros of someone be carrying it to my laptop?

7

I'm interested in the pros that this can bring to my laptop.

    
asked by anonymous 08.01.2018 / 08:59

1 answer

8

A musl (whose name is spelled in lowercase in the official page) is a Library default of C . According to its author, it aims to be a clean, standard and efficient libc .

Your target OS is Linux 2.6 , and is officially available on platforms i386 , x86_64 , arm , mips , microblaze and powerpc . It has experimental support for other architectures, listed on the official website.

One of the advantages of using mobile is its size and ability to compete. Another very important point for commercial application developers is that it uses the MIT license , generally more permissive than the glibc which is LGPL >, especially allowing it to be used in closed applications as well.

See a brief comparison with glibc :

COMPARAÇÃO DE TAMANHO                musl            glibc
----------------------------------   -------------   -----------------
Coleção de bibliotecas estáticas   | 426k          | 2.0M
Coleção de bibliotecas dinâmicas   | 527k          | 7.9M
Menor executável C                 | 1.8k          | 662k
“hello” estático (com printf)      | 13k           | 662k

COMPORTAMENTO EM EXAUSTÃO            musl            glibc
----------------------------------   -------------   -----------------
Armazenamento Thread-local         | reporta falha | aborta
SIGEV_THREAD timers                | não falha     | perda de overruns
pthread_cancel                     | não falha     | aborta
regcomp e regexec                  | reporta falha | quebra
fnmatch                            | não falha     | reporta falha
Família printf                     | não falha     | reporta falha
Família strtol                     | não falha     | não falha

COMPARAÇÃO DE RECURSOS               musl            glibc
----------------------------------   -------------   -----------------
API de threads C11                 | sim           | não
agendamento de processos POSIX     | apenas stub   | incorreto
Localedef POSIX                    | não           | sim
páginas de código 8 bits legadas   | não           | lento, via gconv
Páginas de código CJK legadas      | não           | lento, via gconv
UTF-8 multibyte                    | nativo;       | lento, via gconv;
                                   | 100% conforme | não conforme
Conversão de caracteres Iconv      | a maior parte | o básico
                                   | dos encodings |
extensão de transliteração Iconv   | não           | sim
Openwall-style TCB shadow          | sim           | não
Sun RPC, NIS                       | não           | sim
Profiling Gmon                     | não           | sim
recursos de debug                  | não           | sim

(see the link to the original table at the end of the answer)


According to Wikipedia en , the musl was written from zero, to allow static "linkage" with robustness to realtime applications, avoiding race conditions and exhaustion of resources present in the most common implementations until then.

Runtime is a single file, with stable binary interface, allowing deploy to the main application in a single executable without swelling its final size.

The project claims to be compatible with POSIX 2008 and the C11 standard. In 2015 it was the standard C library of Alpine Linux distros, Dragora 3, OpenWRT, Sabotage, Morpheus Linux and an option on Void Linux.

Official page:

  

link

Here we have a complete comparison with other libc , from which the table above was extracted:

  

link

    
08.01.2018 / 09:37