I 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?
For fun, I decided to take a look at a random syscall: fork.
* https://github.com/yuan-xy/Linux-0.11/blob/master/kernel/for...
* https://github.com/Poseidon-fan/linux-0.11-rs/blob/420152fdf...
The Rust is slightly shorter, though it also isn't organized in exactly the same way. The code isn't that different overall, creating and copying some data structures around, as you'd expect for a fork implementation of this vintage.
Maybe I got lucky, but I would expect that it's more of what other people said: this repository includes far more than the kernel.
According to this breakdown: https://ghloc.vercel.app/Poseidon-fan/linux-0.11-rs?branch=m...
It's about 15k lines of code for the kernel and the rest is various utilities, libraries and programs that can run on the kernel.
This repo contains a lot of extra tools and userspace programs.
The majority of Rust the code in the repo is not for the Linux kernel.
I don't think it's rust
I like how everyone has a different theory as to why
because of AI
More LoC means easier to quantify the impact when telling a story. The actual code quality may be lower but that’s the schmuck’s problem that comes after once promo is acquired.
One of the tradeoffs of Rust is its verbosity I think (in return for which Rustaceans would say you gain explicitness).
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 count.