Vibeleaderboard
← All Intel
Intel / article

Bun in Rust (Claude Code)

Source
simonwillison.net
Author
Simon Willison
Date

Context

A software 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- 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
  • Application — Software arranged so that a person can use it; in this course, the software around a model that accepts your request, prepares the context and shows the reply.
  • File — A named unit of stored data that keeps its contents while no program is using it.
  • Agent — A system in which a model repeatedly chooses operations, a harness carries them out, and the results return to the model to inform its next choice.

Get the Brief

A cited digest of what matters for people building with AI, every morning. Unsubscribe anytime. See today’s edition

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
Tools in this story
More from Simon Willison
Recommended reads