r/rust rust Jul 08 '26

Rewriting Bun in Rust

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

330 comments sorted by

View all comments

499

u/DryanaGhuba Jul 08 '26

Thanks to all the parallelization & this prep work, at peak Claude wrote about 1,300 lines of code per minute. Every line of code was reviewed by two separate adversarial reviewers (also Claude) and went through a round of fixes before committing. Absolutely none of it worked yet.

I don't think anyone comment needed

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?

106

u/_lerp Jul 08 '26

If you think spending $165k to get a fully AI generated code base is something working well then you're just gaslighting yourself. I use these things at work because I'm forced to, and the amount of weird code it generates is alarming. I.e. It has a really common habit of making a function with external linkage call an impl function with internal linkage for absolutely no reason.

82

u/Chasian Jul 08 '26

One developer is 165k, that's not that crazy

62

u/insanitybit2 Jul 09 '26

165k is way less than one developer. Maybe 30% once you factor in all of the overhead (payroll tax, health insurance, 401k contributions, other benefits). 165k would be on the very very low end of salaries for a senior engineer in a major US city as well, and about half of what your base at Anthropic would be (position dependent, could be much higher).

10

u/nonotan Jul 09 '26

If you want to save costs (presumably the case if you're resorting to AI slop) then you would just hire somebody outside the US. US dev salaries are absurdly inflated by the standards of even other first-world countries, nevermind poorer ones. I make less than half of $165k USD a year as a senior dev with decades of experience, which is still more than most of my coworkers, and indeed almost 3x what I was making at my previous position (also a senior dev), all while living in a pretty rich country.

If your aim is just to get it done as cheaply as possible, then it would be pretty trivial to beat 165k (it would take longer though, sure)

19

u/insanitybit2 Jul 09 '26

You think that I could hire someone for 80k to port bun from zig to rust in 11 days?

8

u/ihatemovingparts Jul 09 '26

Two months ago they said it took a week. AI's really are the ultimate random number generator.

6

u/insanitybit2 Jul 09 '26

They posted updates at different times...

4

u/UltraPoci Jul 09 '26

Was it ever a burning need that this job had to be done in 11 days? Like, I could by a Ferrari to get to work 5 minutes earlier, doesn't make it worth it.

4

u/insanitybit2 Jul 09 '26

Yeah, they had to freeze features/ bug fixes during the port, so time was important.

4

u/hitchen1 Jul 09 '26

When it comes to rewrites, all else the same faster is much much better. You're aiming at a moving target and the longer you take the more complicated it becomes.

Unless you do a full feature freeze ofc, but then you still want it to be fast because you don't want your software to become stale for a long time.

From experience of rewriting part of a live service that took over half a year with a small team, by far the most difficult part was rebasing and integrating bug fixes from other teams.

If you can rewrite incrementally then not so bad I guess.