Recently I’ve been toying with a few ideas, mostly some wrt a (massive) project of a type-1 hypervisor written in rust (a-la ESXi).
Thinking about this, and switching between ideas such as a free-standing rust kernel, I’ve also had the idea of packaging a very small Linux distribution with; the Linux kernel, and a rust-compiled
init program that calls upon decades-tested kernel modules such as
However, with that, I’ve come to realise that glibc is taken for granted, and required in some form for rust programs (either
-musl). What’s the reason that a “truly” freestanding rust binary can’t be created on Linux? Either by statically linking against aforementioned glibc library (though I’ve seen advice against it), or by somehow re-implementing and providing all libc functionality through rust, creating no dependency on it?
I understand if this is somewhat of a “why would you do that” issue, but I’m just curious, as this looks like a “missing piece” to me. What’s the dependency on gnu on Linux all about? Historical context notwithstanding.
(If this is in the wrong label, please transfer it)