This Rust rewrite would've taken a team of engineers with full-context on the codebase a year of work
Doubt.
This Rust rewrite would've taken a team of engineers with full-context on the codebase a year of work
Doubt.
There are a lot of ways to do a terrible job of this. For example, prompting Claude "Rewrite Bun in Rust. Don't make any mistakes." and then praying it would work is not [sic] what I did.
Adversarial workflows seems like an awesome strategy for burning tokens if your workplace uses a token leaderboard. I'm glad to see that someone discovered a way to game the system!
I'm really hoping that Boa can compete soon. I'd love an embeddable, Rust-based JS engine that isn't just AI generated unsafe everywhere. I don't think they plan to really fit into the same space as node/deno/bun, but we already have node for that, and an easier to use JS runtime from within Rust would be awesome.
Rust-based JS engine that isn’t just AI generated unsafe everywhere
Tbf only 4% of the code was unsafe after the rewrite, which is much better than the 100% of the Zig code being unsafe. Honestly it's not surprising you'd have such a large amount of unsafe when you translate Zig to Rust. But as I understand it, it's since been refactored to much less than 4%.
unsafe everywhere
Might as well use C at that point.
https://andrewkelley.me/post/my-thoughts-bun-rust-rewrite.html
Commentary/blog post by Andrew Kelley (Zig creator) for perspective!
Very interesting achievement, and of course requires domain knowledge to implement (which you can’t get without experience!)
Honestly, if this is tge future for software engineers,, I'll leave the fields when I ma forced to do it.
all 11 comments