Rust is amazing, as long as I’m not the one writing it

2026-11-11来源 dev.to AIEnglish

The creator of Ruby on Rails says reading Rust is like “pouring acid in my eyes.” Yet he loves it. I wanted to understand why.

I’m the JavaScript and PHP guy.

Web apps, full stack, a bit of infrastructure: Docker, servers, deploys.

Systems programming? Never needed it. Never wrote about it.

Then my timeline changed. Suddenly everybody is talking about Rust.

Rust this. Rewritten in Rust that. “Blazingly fast” under every other post.

I haven’t written a single line of Rust. So this is the view from outside the fence.

The picture we had of Rust

From where I sat, Rust was what you reach for when you write system code. The low-level stuff, close to the machine.

Same shelf as C and C++. The shelf you need a ladder for.

And the syntax. Here’s a function from the official Rust book:

fn longest<'a>(x: &'a str, y: &'a str) -> &'a str { if x.len() > y.len() { x } else { y } } 

It’s the simplest case in the book, and all it does is return the longer in bytes of two strings. Yes.

In JavaScript, that’s one line and nobody gets hurt.

That 'a? Not a typo. It's called a lifetime. I'll tell you what it is when I find out.

Even the Rails guy flinches

I’m not the only one squinting.

DHH, the creator of Ruby on Rails, at his Rails World 2026 keynote:

Rust to me is like pouring acid in my eyes when I have to look at the code.

He kept going:

It is, in my opinion, the ugliest programming language that has been invented in probably the last 40 years.

And going:

Absolutely inhumane to ask people of flesh and blood to subject their eyeballs to this.

He loves it. As long as he doesn’t have to look at it:

"If all I have to do is revel in applications being 30 or 100 times faster, compiling down to minuscule executables that start up in sub milliseconds. I love Rust."

Rust is amazing. As long as you never, ever have to read it yourself.

I think he was talking about a world where AI writes the low-level code.

So why the sudden outburst?

Did everybody get smarter overnight?

No. I checked. I didn’t.

My theory: AI does most of the typing now, and typing was the part of Rust that scared people off.

AI doesn’t make ownership and lifetimes any easier to understand. It just means you no longer have to type them from scratch. Once AI removed that bottleneck, what’s left is the part everyone wanted anyway: the speed and the safety.

Rust is also unusually friendly to AI.

Why Rust and AI get along

It’s statically typed. Every variable and every function call has a type, and the compiler knows it before the code runs. So do Go, Java and TypeScript. The difference is what Rust’s compiler does with that knowledge.

The compiler is strict. Most mistakes get caught before your code runs, not in production at 2am. For an AI, that’s a feedback loop: write, compile, read the error, fix, repeat. The compiler marks the AI’s homework.

No null. If a value might be missing, the type says so, and the compiler makes you handle it. No more Cannot read properties of undefined at the worst possible moment. Rust still panics, but at a line you can point to.

Rust’s compiler is just the strictest teacher in the room.

And when it finally compiles, you get the speed: same category as C and C++.

So the AI writes, the compiler checks and nobody’s eyes get hurt.

The rewrites are already on my timeline

Once the intimidation went, people started building. And rewriting. A lot.

  • PHP, reimplemented in Rust, mostly by AI (php-rust).
  • An experimental Rust port of the TypeScript compiler (ts-rust). Funny detail: Microsoft’s own native TypeScript compiler is written in Go. Someone ported that to Rust. With AI.
  • Your JavaScript build tools. More on this one below.

I went down the php-rust rabbit hole in an earlier post if you want the details.

You’re probably running Rust already

Vite 8 “ships with Rolldown as its single, unified, Rust-based bundler.”

And it’s not alone:

  • SWC: compiles and minifies JavaScript and TypeScript
  • Biome: linting and formatting
  • Oxc: parser, linter, transformer
  • Lightning CSS: parses, transforms and minifies CSS
  • Rspack: a webpack-compatible bundler

You npm install them like anything else. Under the hood it's a compiled Rust binary doing the heavy lifting, and that's much faster for CPU-heavy work: parsing, compiling, transforming code.

To be fair, a lot of these tools started before AI got good at writing code. The speed was always the selling point. AI didn’t put Rust in your build tools. It put Rust on your timeline.

You’ve been using Rust every day without having to look at it. DHH would approve.

Rust in the browser? Yes, really.

Rust also compiles to WebAssembly, which runs in the browser next to your JavaScript.

So the heavy part of a web app (image processing, parsing a huge file, anything that makes the tab freeze) can be Rust, while the rest stays JavaScript.

Will Rust replace JavaScript?

No.

JavaScript is still the language of the browser. Your web app is not getting rewritten in Rust. (Please don’t.)

But I think Rust will replace many of the JavaScript-based tools in the build pipeline, because it’s faster and it’s safer.

The future I see is Rust plus JavaScript, not Rust versus JavaScript.

If you’re a JavaScript developer feeling the FOMO

Don’t leave JavaScript. Add to it.

  1. Learn the basics of Rust: types, ownership, the borrow checker. Enough to read what the AI writes.
  2. Use AI to get your code right, and read the compiler errors with it.
  3. Keep reading. As you use AI to work, you get better at it too. Every error it fixes in front of you is a free lesson.

From outside the fence

I don’t know what the future of Rust looks like.

But from where I’m standing, it’s getting a lot less scary.

Keep building software someone can still read.

原文:https://www.a8q9.cn/en/article/rust-is-amazing-as-long-as-i-m-not-the-one-writing-it-97307c.html

相关文章