6 ms·
One of the things I'm noticing in looking through the musl code in comparison to FreeBSD's libc (yes, it's not glibc, but it's also a full-featured libc) is tha
by Sanddancer 11y ago
One of the things I'm noticing in looking through the musl code in comparison to FreeBSD's libc (yes, it's not glibc, but it's also a full-featured libc) is that musl makes a lot more assumptions about the base system and the results it gets back. Looking through getaddrinfo.c, musl doesn't handle systems that don't have ipv6 enabled, doesn't document the tricky corner cases of the RFCs that cover name resolution, doesn't check for order of precedence, doesn't handle site local address ranges, etc. Other sticky points offhand look like a much lower amount of i18n support in musl, the inclusion of floating point emulation in the bigger C libraries, and other bits and pieces that are useful when you find yourself on platforms that aren't as full featured as other architectures. Aditionally, individual files in musl do not carry licensing and other information, which again pushes up counts of code length.
This is just a 10000 foot view of the two, but hopefully is helpful in starting to explain why musl's small size may not be all that advantageous if you want the kind of coverage a libc like glibc or freebsd libc has.