(Crazy) Idea: incrementally porting Linux std to syscalls

We have a proposal by @japaric to introduce a new Linux target which will use raw syscalls instead of relying on libc:

But I wonder if instead of introducing a new target we could migrate existing Linux targets to raw syscalls incrementally? Yes, motivation for it is probably a bit too weak, especially considering the existence of musl target. Apart from really tiny performance improvements and improved portability for some applications, we probably will not get much. And because of things like system allocator, unwinding, hostname lookup, errno and others, we will not be able to make std 100% libc-free in several years at least. But still I think it’s worth to discuss.

What do you think?


Yeah, really tiny.

How portability is improved against musl?

1 Like

I’d love to have a Linux target that doesn’t depend on libc at all. I’d absolutely use that for some use cases. However, that can’t be the only target, because full interoperability with C that does call libc requires calling into libc. You already mentioned errno and malloc and hostname lookup; we’d also need to use native threads.


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.