Claude Code uses Bun written in Rust now
TL;DR Highlight
Inspecting the Claude Code binary shows it now bundles Bun v1.4.0, the Rust port.
Who Should Read
A developer using Claude Code or the Bun runtime who wants to know whether the Rust port of Bun is actually shipping.
Core Mechanics
- Rust Bun since Claude Code 2.1.181
- Jarred Sumner said Claude Code v2.1.181 (released June 17) and later use the Rust port of Bun.
- Startup got 10% faster on Linux, and otherwise barely anyone noticed.
- strings shows Bun v1.4.0
- `strings ~/.local/bin/claude | grep -m1 'Bun v1'` printed Bun v1.4.0 (macOS arm64) on Simon Willison's machine.
- The latest GitHub release is v1.3.14 (May 12), so a not-yet-released version is being shipped.
- 563 .rs files in the binary
- `grep -Eo 'src/[[:alnum:]_./-]+\.rs'` returned 563 filenames.
- They include paths like src/runtime/bake/dev_server/mod.rs and src/bundler/bundle_v2.rs.
- Bun.version also confirms it
- Ajan Raj's trick preloads a script via BUN_OPTIONS="--preload=..." that prints Bun.version.
- It printed 1.4.0 for Simon Willison.
- Rust version available as canary
Community Reactions
- Manual memory management in Zig caused bugs, one comment argued
- Tracking memory lifecycles by hand in Zig led to many missed-free bugs, while Rust handles it automatically.
- The commenter said compiler errors are a deterministic guardrail for coding agents.
- Criticism of communication and governance
- One commenter said merging a 1M+ line PR in under a month hurt trust.
- Another could find no governance docs and guessed Anthropic basically decides.
- Concerns about code quality and stability
- One commenter called the result a non-idiomatic transpile.
- Another reported Claude Code has been buggier lately, with garbled TUI rendering.
- Calls for RAM and CPU data
- A commenter wanted to know memory and CPU usage and whether deadlocks appear, beyond faster startup.
- Others asked why not use Deno or rewrite Claude Code natively.
How to Apply
- Check the Bun version in your Claude Code
- Run `strings ~/.local/bin/claude | grep -m1 'Bun v1'` in your terminal.
- If it prints Bun v1.4.0, you have the Rust build.
- Run your project on Bun canary
- In a separate branch or CI job, run `bun upgrade --canary`.
- Run your existing test suite and compare results, speed and memory against the Zig build.
- Pin the Bun version in production
- Pin an explicit Bun version in production to prevent automatic upgrades.
- Set your own switch date after the stable release and clearer governance.
Try It
# Paste into your terminal (shell): check the Bun version embedded in Claude Code
strings ~/.local/bin/claude | grep -m1 'Bun v1'
# Check that .rs file paths exist in the binary
strings ~/.local/bin/claude | grep -Eo 'src/[[:alnum:]_./-]+\.rs' | head
# Next: print Bun.version directly (Ajan Raj's trick)
cat > /tmp/bun-version.ts <<'EOF'
console.log("embedded bun:", Bun.version);
process.exit(0);
EOF
BUN_OPTIONS="--preload=/tmp/bun-version.ts" claude --versionTerminology
Related Papers
Same Simulation, Different Evidence: Where Retrieved Tool Output Costs LLM Agents Accuracy
Saving long tool output to files cut GPT-5.1 accuracy by 11.3 points; naming the authoritative file restored it.
Fake News, Real Crashes: Information Injection Attacks on LLM Financial Trading Agents
Fake headlines hijacked LLM trading agents 62% of the time versus 14% for prompt injection.
Harness Engineering 101: The LLM is the brain, the harness is the body
An agent is a loop managing a JSON array; 16 chapters build one from scratch
Harness2 by Google Research – Recursive Agent Harnessing
Recursively refining the harness with fixed model weights raised benchmark scores by up to 11.8 points.
Ousted Savannah police officer gave ICE agent husband access to Flock system
A police officer shared her Flock login with her ICE-agent husband; an audit found 983 searches and she was fired
Tmux and Claude Code: Sessions, Send-Keys, and the Ceiling
Running Claude Code agents in tmux works well, but limits appear around four agents.