Claude Code Now Uses Bun Written in Rust
10% performance boost achieved in software
1The Reason Behind the Rust Transition
With version 2.1.181, Claude Code started using the Rust-rewritten version of the Bun JavaScript runtime. This change brought a 10% performance improvement, particularly on Linux systems. Developer Jarred Sumner emphasizes that such 'boring' improvements are actually critical for system stability.
2Technical Evidence
Users can verify Bun's Rust version by analyzing their Claude Code binary. Investigations using the 'strings' command reveal the use of Bun 1.4.0 (not yet officially released) and the presence of over 500 Rust files. This serves as technical proof that the Rust port is actively being used.
3Version Verification Methods
Developers have shared various methods to verify the Bun version running on systems. Particularly, using 'BUN_OPTIONS' with a preloaded script to display the embedded Bun version makes it easier for users to understand which runtime they're using. These techniques confirm the widespread use of the Rust port.
4Canary Release Details
The Rust-written Bun currently appears only in canary (test) releases. Users can switch to this version using the 'bun upgrade --canary' command. It's noteworthy that the version marked as 1.4.0 in the package manager since May hasn't yet been released as a stable version.
5Deployment Scale
The Rust port is reported to run smoothly on millions of devices. Its optimization for macOS arm64 architecture demonstrates performance consistency across platforms. This large-scale deployment proves Rust's reliability in production environments.
6Software Architecture Trends
Claude Code's move is an indicator of Rust's growing popularity in performance-critical software. The trend of rewriting JavaScript runtime's with system languages offers both security and performance advantages. This shift could mark a significant turning point in software architecture.