Live data from Hacker News

Learnings from 100K lines of Rust with AI (2025)

zfhuang99.github.io

51–60 of 225 posts

Re: Learnings from 100K lines of Rust with AI (2025)

#52
post #20

How many of those tests have you actually read yourself if all of them are generated by AI (also when you're sleeping) ? This is from 2025 - I would like to see an update now how that system turned out to be after the vibe hype

I feel like there's very little blogs that actually follow up on their experiment. It's just dopamine city.

Re: Learnings from 100K lines of Rust with AI (2025)

#53
post #14

Earlier quoted context omitted.

A lefthook: format: glob: " .rs" run: cargo fmt -- --check lint: glob: " .rs" run: cargo clippy -- -D warnings tests: run: cargo test audit: run: cargo audit + hooks that shove the lefthook automatically in the ai's face --- rustfmt.toml: edition = "2021" newline_style = "Unix" use_small_heuristics = "Max" max_width = 100

use "stage_fixed" to automatically persist the formatting :)

Thank you!

Re: Learnings from 100K lines of Rust with AI (2025)

#54
We're working on a large Rust codebase, heavily assisted development with Claude and Codex, and one critical workflow is after you have written a spec, have the other LLM critique it thoroughly.

This back and forth will take quite a while, but the resulting implementation plan will be 10x better than the original.

You can automate this by giving Codex a goal, and a skill to call Claude to review the implementation spec until they both agree it's done.

Then, for critical code, have them both implement the spec in a worktree, then BOTH critique each other's implementation.

More often than not, Claude will say to take 2 or 3 pieces from it's design over to Codex, but ship the Codex implementation.

Re: Learnings from 100K lines of Rust with AI (2025)

#55
post #9

I'm also shifting to an vibe coding workflow, but I have a genuine question: whenever I use AI for Rust, it makes an insane amount of lifetime errors. I have no idea how people are churning out so many lines of code so quickly. Honestly, despite all the hype around Rust in the community, the fact that AI can't handle lifetimes reliably makes me reluctant to use it. The AI constantly defaults to spamming .clone() or w…

> I'm also shifting to an vibe coding workflow, but I have a genuine question: whenever I use AI for Rust, it makes an insane amount of lifetime errors. I have no idea how people are churning out so many lines of code so quickly. What harness and model you've been using? For the last few months, essentially since I did the whole "One Human + One Agent = One Browser From Scratch" experiment, I've almost exclusively be…

Have you split your 100k loc codebases into smaller crates? If you take a look at eg gitoxide's repo, they've split it in many smaller crates. I think that might help with keeping the scope for the ai small and maybe help with keeping contracts tight and well-defined.

Re: Learnings from 100K lines of Rust with AI (2025)

#56

Earlier quoted context omitted.

> whenever I use AI for Rust, it makes an insane amount of lifetime errors. What model are you using, and what frameworks are you using? This is not a hard problem for LLMs to solve. Rust is nearly the perfect language for LLMs. It's exceptionally expressive, and it forbids entirely the most common globally complex bugs that LLMs simply do not (and won't for some time) have the context window size to properly reason…

It's not nearly the perfect language for LLMs and Rust is dramatically harder to read and reason about than Python with types. Other options work better for nearly all apps. I found Kotlin works well: - Garbage collected so no reasoning tokens or dev cycles are wasted on manual memory management. You say if you're vibe coding you can ignore lifetimes, but in response to a post that says AI can't do a good job and con…

Then your domain problem you’re trying to solve doesn’t benefit from Rust.

Sounds like your work doesn’t need Rust and that’s ok.

But don’t generalize.

Re: Learnings from 100K lines of Rust with AI (2025)

#57
This is great example of AI slop and a big problem with AI coding.

Original RSL library has 36 KLoC across C++ source and headers files. Rust supposed to be more expressive and concise. Yet, AI generated 130k LoCs. I guess nobody understands how this code works and nobody can tell if it actually works.

Re: Learnings from 100K lines of Rust with AI (2025)

#59
post #3

It's almost guaranteed with agents you could do the same job with less than half of 100k lines. I don't know whats impressive in lines of code generated by agent.

It just an anchor. If it were 50k would you say the same down to 25k? And if so how many more times would it apply? The interesting thing is that it was manageable solo (in many ways it's _more_ manageable solo+AIs than with coworkers+(their)AIs), and in such a short amount of time.

Original RSL library is 36k LoC. And this is C++. Rust should be like 50% smaller, that is, 18k LoC. This library is so big that I bet the author has no idea if it works or not. 1300 test generated by AI say nothing about actual quality.

In the end it is just a lot of unmaintainable code quickly generated by AI.

Re: Learnings from 100K lines of Rust with AI (2025)

#60
post #45
post #23

Earlier quoted context omitted.

I wrote and maintain this library of skills and workflows called Rust Bucket[0] It sets up your repo to ensure agents use a workflow which breaks your user requests down into separate beads, works on them serially, runs a judge agent after every bead is complete to apply code quality rules, and also strict static checks of your code. It's really helpful in extracting long, high-quality turns from the agent. It's what…

rust-bucket is 404, did you make it private?

Thanks for the flag--I guess I must have never made it public.

Fixed.

Post reply on HN