Article
Rewriting Bun in Rust
Jarred Sumner
- I asked Claude to loop the workflow on all 1,448 .zig files, and about 2 minutes in, one Claude ran
git stashbefore committing. Another rangit stash pop. And thengit reset HEAD --hard. They were stepping on each other! And if I put each Claude into a separate worktree, I would run out of disk space because Bun’s git repository is too big and eventually the changes will need to be compiled and seen together. So, I asked Claude to edit the workflow to instruct Claude to never rungit stashorgit resetor anygitcommand that doesn’t commit a specific file at once. Nocargoeither. No slow commands at all. - Claude interpreted “let’s get all the crates to compile” as “stub out the functions with compilation errors”. Claude also started adding suspiciously long explanatory comments to document workarounds, so I added this rule for the adversarial reviewers to reject: If you need a paragraph-long comment to justify why the workaround is OK, the code is wrong — fix the code. One prompt edit and a few hours later, these things stopped happening. Models love saying “smoke tests”
- This Rust rewrite would’ve taken a team of engineers with full-context on the codebase a year of work. With 1 engineer using Fable & closely monitoring Claude Code, we went from start to 100% of the test suite passing on all platforms in 11 days. One engineer can do a lot more today than a year ago.