RSoC 2026: A new CPU scheduler for Redox OS (redox-os.org)

36 points by akyuu 3 days ago

5 comments:

by TheMagicHorsey 3 days ago

I had no idea there was an entire OS written in Rust that was this far along. Is all the bootstrapping from assembly directly into Rust, or do they still have a dependency on C and gcc just to get things going?

by yencabulator a day ago

Here, make your own "kernel" in a few lines: https://rust-osdev.github.io/uefi-rs/tutorial/app.html

by steveklabnik 2 hours ago

There are pure rust, no c, embedded RTOSes, like Hubris.

by segbrk 3 days ago
by refulgentis 2 hours ago

Thanks for the link! For anyone else clicking through: this is the kernel entry point for x86/x86_64. What it shows is a very thin #[naked] inline assembly trampoline (kstart) that sets up the stack and immediately jumps into unsafe extern "C" fn start(), which is pure Rust. So the bootstrap path here is: a few dozen lines of inline asm to Rust, no C.

Though it's worth noting this is one file in one component. The kernel entry being C-free doesn't necessarily tell the whole story. If you peek at that directory listing in the blog post, relibc/ is in recipes/core. reblic is Redox's libc replacement, which is mostly Rust, but has historically needed a C compiler for some POSIX compatibility shims.

And the bootloader, firmware handoff, and build system are all separate questions.

So the short answer to the original question seems to be: the kernel itself bootstraps from minimal inline asm directly into Rust, no C in the path. The full OS build story is probably more nuanced than any single source file can confirm.

Data from: Hacker News, provided by Hacker News (unofficial) API