Skip to content
OBLAIDISH NEWS
Claude Code runs on Bun after Rust rewrite
TX_484083AI

Claude Code runs on Bun after Rust rewrite

Anthropic’s Claude Code library has been rewritten in Rust and now runs on the Bun runtime, delivering a 30% latency reduction and lower memory usage for AI‑powered tooling. [hn-front][Simon Willison]

Anthropic has released a Rust rewrite of its Claude Code library that now runs on the Bun JavaScript runtime. The new build cuts end‑to‑end latency by roughly 30% on the benchmark suite used by the team, according to the author’s post‑mortem [hn-front][Simon Willison]. The migration required moving the core inference engine into Rust, compiling it to a native binary, and exposing it to Bun via the runtime’s FFI layer. The resulting package is published as version 1.0.0 on npm and can be imported with a single import statement.

The Rust rewrite replaces the previous Node‑based implementation, which relied on a Python‑backed subprocess for heavy lifting. By handling tokenization and model inference directly in Rust, the code eliminates the overhead of spawning external processes and reduces memory pressure. Benchmarks show a 30% latency drop on typical Claude Code workloads and a 15% reduction in peak memory usage [hn-front]. The Bun integration also means developers can leverage Bun’s fast startup time and built‑in TypeScript support without adding extra dependencies.

Why it matters: the performance gains translate into faster response times for AI‑powered tools that embed Claude Code, improving user experience and lowering compute costs. The successful run on Bun demonstrates that the runtime is viable for production‑grade AI workloads, giving developers an alternative to Node.js or Deno. Finally, the project adds to the growing body of AI codebases that adopt Rust for its safety and speed, signaling broader industry confidence in the language for high‑performance inference.


Poll: Which runtime do you trust for high‑performance AI applications?

  • Bun
  • Node.js
  • Deno
operator_channel
[ comments_offline · provider_not_configured ]
transmission_log

Subscribe to the broadcast.

Daily digest of the day's most important tech news. No fluff. Engineering signal only.

// delivered via substack · double-opt-in confirmation