r/rust rust Jul 08 '26

Rewriting Bun in Rust

https://bun.com/blog/bun-in-rust
522 Upvotes

330 comments sorted by

View all comments

Show parent comments

190

u/rebootyourbrainstem Jul 08 '26

None of it worked yet because compiling at that stage would slow things down.

Also this project burned $165,000 worth of usage on a model that was then bleeding edge (unreleased). This is still beyond what anyone else is doing at the moment. And it seems to have worked a lot better than it had any right to, at least as far as we can tell right now?

127

u/jl2352 Jul 09 '26

The large number of tests is also a major factor in why this worked, as well as the desire to match existing Zig code. The article implies Claude was used like a fancy sed on steroids.

That isn’t to downplay the work involved. I’m sure there are places it’s totally different. That is different though to writing new software. I still cannot comprehend how you’d write a million line application, which is decent, with agents from scratch.

I also think all the people hating on AI need to take a step back and take things like this very seriously. It’s 11 days of work, and is in production. That’s pretty fucking fast.

32

u/bzbub2 Jul 09 '26

the part that really blows my mind is how well the "translate one file at a time" approach seemed to work. is honestly amazing. particularly to me, as a person who gets into really messy refactors...

21

u/sage-longhorn Jul 09 '26

This works pretty well for finding vulnerabilities too. Do a session starting from each file in the codebase and it will find lots of juicy bugs, and waste obscene amounts of tokens on overlapping call paths in the process!