Bun's experimental Rust rewrite hits 99.8% test compatibility on Linux x64 glibc

· coding · Source ↗

TLDR

  • Jarred Sumner reports 99.8% of Bun’s existing test suite passing on Linux x64 glibc in an experimental Rust rewrite, completed in roughly 6 days.

Key Takeaways

  • The rewrite targets Linux x64 glibc first; no production release announced.
  • 99.8% pass rate was achieved against Bun’s pre-existing, comprehensive test suite, not a new one.
  • Jarred confirmed the branch started with 16,000+ cargo check errors and could not run JavaScript just days earlier.
  • The project remains experimental; Bun team has not committed to shipping the Rust rewrite.

Hacker News Comment Review

  • Commenters credit the speed largely to Bun’s unusually comprehensive test suite, which gave LLMs clear acceptance criteria and a full reference implementation to translate against.
  • Skepticism centers on heavy unsafe usage in the generated Rust code, which undermines memory-safety guarantees and makes the rewrite less of a stability improvement over Zig than headlines suggest.
  • The Zig-to-Rust pivot generated pointed criticism about Bun’s strategic consistency, while others noted it demonstrates compute-as-competitive-advantage: teams with more LLM tokens can execute language migrations in days.

Notable Comments

  • @ksec: High pass rate is downstream of the test suite quality, not just the rewrite speed.
  • @perlgeek: Raises unresolved copyright question: LLM-translated code from a Zig source may carry original ownership claims despite being machine-generated.

Original | Discuss on HN