TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Musl-libc version 1.0.0 released

100 点作者 deoxxa大约 11 年前

7 条评论

justincormack大约 11 年前
I have been using Musl for various purposes for quite some time. I think my favourite things are:<p>* The team are very helpful, and fix things fast and correctly. You can see some of the detail in this post on race conditions in glibc <a href="http://ewontfix.com/16/" rel="nofollow">http:&#x2F;&#x2F;ewontfix.com&#x2F;16&#x2F;</a><p>* It is very standards compliant, so it is a good portability test for your code. It is a bit like using a BSD libc, except it does have Linux specific syscalls etc.<p>* Static linking works, which it doesnt properly in glibc. If you want to be like those trendy Go people and provide simple statically linked single file binaries, for running in containers etc then you can. And they will be small: the glibc shared library is 1.8MB (not including rt, pthread etc), while a Musl statically linked copy of Lua for example is only 160k. Static linking is very useful for all sorts of things, my most recent use was cross compiling bianries to run under qemu-user for testing.<p>* It is BSD licensed so you can use it in completely different projects however you want, eg OSv uses it <a href="http://osv.io/" rel="nofollow">http:&#x2F;&#x2F;osv.io&#x2F;</a><p>* The code is small and readable. If you want to know how things work you can just take a look, quickly find the code and understand it. Just finding the code in glibc takes ages. I keep a reference copy just for this purpose.<p>You can use the &quot;cross compiler&quot; musl-gcc that ships with it to build if your code is happy being cross compiled (should be, most things just work). If you have a lot of dependencies it might be easier to use a distro, I use Sabotage in a chroot usually <a href="https://github.com/sabotage-linux/sabotage" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sabotage-linux&#x2F;sabotage</a>
评论 #7434636 未加载
评论 #7436112 未加载
dalias大约 11 年前
Hi all. I&#x27;m the original author and maintainer of musl, and I&#x27;m happy to answer any questions anyone might have about the project. Glad to see so much interest!
评论 #7435805 未加载
评论 #7435194 未加载
评论 #7435122 未加载
评论 #7434961 未加载
评论 #7437511 未加载
评论 #7436213 未加载
评论 #7441001 未加载
dalias大约 11 年前
A special treat to go with the release, that&#x27;s not linked on the website yet: in-browser demo setup using jslinux: <a href="http://www.musl-libc.org/jslinux/" rel="nofollow">http:&#x2F;&#x2F;www.musl-libc.org&#x2F;jslinux&#x2F;</a>
评论 #7434623 未加载
nathell大约 11 年前
Any Linux distro built against musl out there?
评论 #7434662 未加载
评论 #7434785 未加载
justincormack大约 11 年前
There is a very minimal Docker build with Musl showing how it can be usd to build a minimal container <a href="https://github.com/mwcampbell/vontainrr" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;mwcampbell&#x2F;vontainrr</a>
评论 #7434752 未加载
Zen101大约 11 年前
Interesting, great update
jokoon大约 11 年前
wait, but I thought premature optimization was evil !
评论 #7435563 未加载