Jarred Sumner has completed a rewrite of the Bun runtime from Zig to Rust, leveraging large language models and agentic engineering to automate the port. The project utilized a conformance test suite written in TypeScript to drive an agent harness that initially generated the Rust code as an experiment with the Mythos/Fable model.

  • The rewrite was driven by memory management issues in Zig, such as use-after-free bugs, which safe Rust prevents through compiler errors and RAII.
  • Sumner monitored the automated workflows for 11 days, manually reviewing outputs and prompting Claude to fix loops when issues arose.
  • The new Rust implementation has been live in Claude Code since version 2.1.181 (released June 17th), resulting in a 10% faster startup time on Linux.
  • The pre-merge phase consumed approximately 5.9 billion uncached input tokens and cost an estimated $165,000 at API pricing.

This effort demonstrates how coordinated parallel agents can handle ambitious software rewrites by automating the initial port while relying on human oversight for quality assurance.