51 comments

[ 3.4 ms ] story [ 56.9 ms ] thread
Nice project, with so many emojis at the start of every title of the README.

Wonder who could have done that?

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?
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.

kinda sad cuz 10klines you really get into "well I can just sit there and bang at the problem by hand" territory.

Sounds like a fun project....

I did not use expensive AI but I notice that free AI model has no problem writing repetetive or excessively long code which I have to edit by hand afterwards. For example, it writes each Python test as a separate function, they are almost similar and I have to rewrite it to a single parametrized test.
I like how everyone has a different theory as to why
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.

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.

Longer isn’t always worse.

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.

Slopware?
Presumably, but exactly the sort of project where slopware is appropriate. Nobody is expected to use it.
Haha, well, maybe a couple dozen grad students creating some unusual extension to the os:)
rewriting {PROGRAM} in rust is so fetch.
Stop trying to make fetch happen
They actually did make fetch happen. Once upon a time it was usual in Javascript to use a thing called XMLHttpRequest which despite its name isn't actually for XML, it's just that XML was a big deal when it was created. The replacement API for making normal HTTP requests is just named fetch, and it was "new" so long ago that popular web browsers had versions like 40 rather than 150.

That movie is so old it's entirely possible that it's just named "fetch" because that's a reasonable thing to call this feature and so it's a coincidence, but I do like to think that at least some people at WHATWG were quoting Mean Girls...

I worked for Fetch Robotics (now defunct), and there were a bunch of people (especially in management) who would constantly reference the Mean Girls "stop trying to make fetch happen" line in company-wide slideshows.

A couple of times it was cute... but they took it too far in my opinion. And sadly the company was bought out, and now they too have decides to "stop trying to make Fetch happen" (yes, officially it was bought out, but not for the actual robots part).

I used to like rust, but I feel like I’m being Pavlovian-conditioned to recoil at its mention now.
I still like it. People are having fun playing with their toy and tool. I have no problem with that.
Of all the tools in software engineering to be overpopular and overused, Rust is an instance where that is a very good thing.

Atleast people aren't AI rewriting things into PHP.

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
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.
I know the answer, because they get their money from AI bros and it's a really good headline.
Memory bugs are unknown unknowns that AI may or may not catch. There's net-present-value in switching to a language where certain types of memory bugs are impossible.
> If you are thinking of AI fixing bugs is less expensive

Because I don't think this. A rewrite is cheaper to me.

I think Rust (the compiler / borrow checker) kinda finds bugs for you, some of which C/C++ does not.

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.

I think Rust is annoyingly complex and badly designed (although it has good parts) and this would be the same mistake as past pushs to move projects to C++ because "object orientation is clearly better", and as such also step towards more complexity that is difficult to undo again and therefor actively harmful. The better and more powerful approach to safety is proving correctness, which is already possible today but we lack good opensource tooling. Proofs can be added to existing code without introducing complexity.
This is Linux 0.11 from 1991.

Someone is having fun with a side experiment that has no practical real-world implications.

This stuff is supposed to be fun and we should celebrate when other people are doing fun, pointless things like this. If you're interested then ignore it and move on. There's no need to get involved or comment if a project of no consequence is uninteresting to you personally

Can you elaborate on what causes that reaction specifically?
Docs full of emojis, this is another AI slop?!

Tangential note: there is already a community effort[1] to rewrite GNU commandline tools into Rust and Canonical shipped the rust version of the /bin/utils in Ubuntu 26.04 Resolute Raccoon by default[2] in their "oxidizing" initiative.[3]

PS: Linus Torvalds has confirmed that the existing Linux kernel will never be fully rewritten in Rust.[4] Let's see how well that statement age.

[1]: https://github.com/uutils/coreutils

[2]: https://canonical.com/blog/canonical-releases-ubuntu-26-04-l...

[3]: https://discourse.ubuntu.com/t/carefully-but-purposefully-ox...

[4]: https://news.ycombinator.com/item?id=41355731

As soon as Linus retires, there will be an initiative to rewrite the Linux kernel in Rust assisted by LLMs. Either that, or some company will fund a fork before that. Imagine, man pages full of emojis!
I 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"
Written by AI and not nearly as impressive at all. Such a shame because I thought someone had spent real time and effort producing this. The output is commoditised and now neither important nor precious. Damn near anyone could repeat it.
To paraphrase another comment (https://news.ycombinator.com/item?id=48900086), this project is fun and fun should be encouraged, as experimentation is what leads to more innovative things. The existence of this project doesn't take away from anything.
I don't think it's wrong to do this and I'm glad it's fun for some, it's just not the same as seeing a project like this that was human authored
I hate LLMs so, so much. They are destroying everything that used to be cool about programming. Or maybe the problem is that a bunch of people who don't actually like programming joined the industry, and now they have a tool that lets them phone it in even harder.
Honestly -- and I know this project is just a toy/fun experiment -- with modern AI, I think this is the correct approach to Rust-ifying projects. Just fork it and do an AI-assisted wholesale conversion, and run in parallel for a while to make sure all the regressions are found. Then you can compare to the original for benefits and drawbacks, and you get a more idiomatic code-base... instead of trying to convince longstanding projects to go into a half-rust Frankenstein model, which is what I usually see.
How does the performance compare?
How to 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.
That is indeed the expectation. But what’s the reality?
The ultimate boss of Rust rewrites. Very happy that LLM assisted coding unlocks these kind of projects
rust 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.
Rock and roll is for people with limited musical ability. Heavy metal is for people with no musical ability. Your comparison of rust to heavy metal is apt and holds up well.
I wonder how long until we have an entire distro in Rust? I worked on this from the other end making drop in clones of bash, git, make, nftables, pf, iptables, and others, build on the Rust uutils.

fwiw, I never liked the ergonomics of Rust when coding by hand, but it is head and shoulders my favorite vibe coding language.