How do the binary sizes compare? An original Linux 0.11 kernel vs. this oxidized version.
If it's written with nostd, I'd expect them to be similar.
Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
71–80 of 147 posts
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#72Earlier quoted context omitted.
I have the opposite feeling; I am liking Rust more and more and thinking most of the world's C code should be rewritten. It seems like a sweet spot of enforced memory safety, performance, and human/agent readability.
why rewrite if you can check for and fix bugs? If you are thinking of AI fixing bugs is less expensive
In that sense, rewriting some code in Rust _may_ be cheaper than fixing the existing code. It may also be more welcoming to newer devs, since Rust can be easier to reason about, which is a long-term investment.
The borrow checker also helps with AI (as long as you don't let the AI use `unsafe`, or completely control what primitives in your codebase are allowed to use unsafe and never vibe-code any of it) — at least, the agent can't stop until `cargo build` passes.
I've also had better experience locally building applications in Rust than in C/C++. `cd ripgrep; cargo install --path .` or `cargo install ripgrep` usually just work, while `make` is usually painful.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#73Earlier quoted context omitted.
why rewrite if you can check for and fix bugs? If you are thinking of AI fixing bugs is less expensive
I guess ask the bun people why they translated from zig to rust. I think it was essentially because rust guarantees a set of bugs can't exist so over medium to long term timeframes you end up with less technical debt.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#74I just compared this Rust implementation against the original C sources. Some ~50k SLOC (Rust) compared to maybe ~8-12k SLOC of C (depending on if you count headers). Why is the Rust implementation so much more complex and onerous?
C code probably has no problem mixing and perverting int vs enum. Bitfields, structs, etc…
A rust program would define an enum and also implement handling of unexpected values (or consider them errors). Structs and bitfields would be more intentionally used.
Sure, Rust macros can avoid the boilerplate code, but overall line count may still increase a bit.
That said, I’d blame auto-generated code here as other commenters do.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#75fwiw, I never liked the ergonomics of Rust when coding by hand, but it is head and shoulders my favorite vibe coding language.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#76I used to like rust, but I feel like I’m being Pavlovian-conditioned to recoil at its mention now.
I have the opposite feeling; I am liking Rust more and more and thinking most of the world's C code should be rewritten. It seems like a sweet spot of enforced memory safety, performance, and human/agent readability.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#77I just compared this Rust implementation against the original C sources. Some ~50k SLOC (Rust) compared to maybe ~8-12k SLOC of C (depending on if you count headers). Why is the Rust implementation so much more complex and onerous?
If the readme is anything to go by, this doesn't look like it was written by hand. Codex if I were to guess. I wonder the coding agent "improved" the code. The readme hints at the prompt: > It keeps the original system's semantics — what it does — while rethinking how it's expressed: stronger types, clearer module boundaries, idiomatic abstractions everywhere. "idiomatic abstractions" would certainly bloat the line c…
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#78rust evangelism is some people / youth of today trying to differentiate themselves from their parents, aka heavy metal of programming. its ok, its fun. i cant read their source code but i dont need to, theres a whole world out there of c/c++/python stuff that will get the job done faster and with less hassle.
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#79I hate that 5 years ago I'd see a headline like this and think it was awesome, and now it's just "look at what someone's spent tokens on today"
Re: Linux 0.11 rewritten in idiomatic Rust, boots in QEMU
#80Earlier quoted context omitted.
I still like it. People are having fun playing with their toy and tool. I have no problem with that.
I shouldn’t have been so negative. I still very much like Rust, but hearing about these AI rewrites constantly is tiresome.