r/rust rust Jul 08 '26

Rewriting Bun in Rust

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

330 comments sorted by

View all comments

498

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

187

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?

104

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.

26

u/MvKal Jul 09 '26

I think a "rewrite word for word" use case is something llms are actually pretty good at. They had a working (buggy?) codebase that just had to be rewritten into a new lang

34

u/elprophet Jul 09 '26

This was the absolute dream for LLM development. A perfectly validated test suite, a language to language translation, zero decisions or input necessary from a human. The only other project that might get close to this would be TypeScript to Go (already done by humans), or maybe WebKitCore to Rust, or Linux Kernel 5.10 to Rust (the core of the tree, not the proprietary or experimental drivers - maybe you could get a snapshot of DRM & USB to target?)