How is the Bun rewrite in Rust going?

Bun’s high‑profile rewrite from Zig to Rust using Anthropic’s Claude model is prompting questions about what “done” really means for an AI‑assisted port of a large runtime. Commenters note that while the Rust version already powers Anthropic’s Claude Code editor and passes extensive tests, there’s still no stable public release, ongoing heavy CI activity, and a large amount of unsafe Rust, all of which suggest significant post‑rewrite hardening work. The thread broadens into a debate over whether such LLM‑driven rewrites are cost‑effective and trustworthy, or mainly a marketing stunt that obscures the long, human‑led effort required to make the result idiomatic, secure, and maintainable.

Status of the Rust rewrite

  • Thread agrees the Zig→Rust translation is functionally done: the Zig code is no longer used and the Rust version runs in production for Claude Code and as a canary (bun upgrade --canary).
  • No formal 1.4 release yet. Some see the lack of a tagged release as evidence the rewrite isn’t “complete” or stable; others argue a long canary period is normal after a major rewrite.
  • A maintainer says the public release is blocked on hitting a promised number of newly passing Node.js tests; release is “most likely” imminent.

Real‑world usage and reliability

  • Claude Code has been running on the Rust runtime for over a month; most users apparently did not notice.
  • Some reports of Bun‑related crashes and memory leaks in Claude Code; others say it’s been stable enough that the rewrite “hasn’t crashed and burned.”
  • Debate over how representative Claude Code is: some argue it uses a large surface of Node/Bun APIs; others say it’s just one app and not proof of broad ecosystem stability.

Safety, “idiomatic Rust”, and tech debt

  • Many comments worry the port is unidiomatic Rust with heavy unsafe and C‑like boundaries, so initial safety isn’t much better than Zig.
  • A rough count of unsafe in the repo appears flat over time, disappointing those who expected progressive reduction via refactoring.
  • Others counter that some unsafe is inherently required (FFI to JavaScriptCore, OS APIs) and that Rust plus tools (linting, miri, tests) make future safety work easier.

Cost, tokens, and CI

  • Initial marketing figure was ~$165k in tokens over ~11 days; commenters estimate total token + CI spend approaching ~$800k as work continued.
  • Some say that’s trivial for a frontier AI company; others note it’s large and potentially misleading as a model for “normal” organizations.
  • CI costs (many platforms/architectures and heavy sharding) are acknowledged as significant and long‑standing, not just rewrite‑driven.

LLMs for large rewrites: hype vs reality

  • Enthusiasts see this as a landmark: a highly complex runtime ported quickly while keeping a large test suite passing; they report similar success using LLMs for ports.
  • Skeptics emphasize long‑term maintenance: LLMs are good at fast mechanical translation, less so at architecture, edge cases, and de‑slopping; the “last 10%” of bugs and bloat is expensive.
  • Concerns raised about shipping large amounts of non‑human‑reviewed LLM code to millions of users, and about Anthropic’s incentives and transparency; others reply that strong tests, Rust’s type system, and dogfooding significantly mitigate risk.