Vibeleaderboard
← All Intel
Intel / article

Bun in Rust (Claude Code)

Source
simonwillison.net
Author
Simon Willison
Date

Context

A software application can ship a newer embedded runtime than the runtime's separate stable release. In his July 19 inspection, Simon Willison found Bun 1.4.0 identification and hundreds of Rust source-file paths inside his installation of Anthropic's Claude Code.

Those findings supported the account that Claude Code was already carrying the Rust version of Bun, the runtime executing its application code. Willison also obtained the embedded version directly through Bun's interface. His inspection provides evidence about what shipped inside that application, independently of whether users had installed Bun's standalone preview.

Key takeaways · AI-distilled
  • Running strings on the claude binary and grepping for 'Bun v1' prints Bun v1.4.0, a version number ahead of any public Bun release. That gap is the tell that the embeds an unreleased build.
  • Grepping the same binary for src/*.rs paths returns 563 Rust filenames, including src/bundler/bundle_v2.rs. That is direct evidence the embedded runtime is the Rust port, not just a version bump.
  • A cleaner check than string-grepping: set BUN_OPTIONS to preload a script that logs Bun.version, then run claude --version. It prints the embedded runtime's own version.
  • The rewrite reached millions of machines through Claude Code from v2.1.181 on, bought about 10% faster startup on Linux, and nobody noticed. For a runtime swap that invisibility is the success condition.
Terms in this piece · Glossary
  • AI agent — An AI system that doesn't just answer once but works toward a goal in a loop — taking actions, reading the results, and deciding what to do next.
Key quotes

“Claude Code v2.1.181 (released June 17th) and later use the Rust port of Bun. Startup got 10% faster on Linux but otherwise, barely anyone noticed. Boring is good.”

Jarred Sumner

“The most recent release of Bun on GitHub is currently v1.3.14 from May 12th, so that v1.4.0 version number in Claude supports them shipping a preview of a not-yet-released Bun version.”

“It looks like Bun in Rust is indeed being run in production across millions of different devices.”

Read the source simonwillison.net
More from Simon Willison
Recommended reads
Comments

Checking sign-in…

Loading comments…