返回 2026-07-20
🛠 工具 / 开源

Claude Code 现在使用用 Rust 编写的 BunClaude Code uses Bun written in Rust now

simonwillison.net·2026-07-19 节选正文

Jarred Sumner 宣布 Claude Code v2.1.181 及更高版本已开始使用 Rust 重写的 Bun 运行时。这一改动使 Linux 上的启动速度提升了 10%,且对大多数用户来说几乎无感。Simon Willison 通过检查自己的 Claude Code 安装环境,找到了其使用 Rust 版 Bun 的确凿证据。这表明底层运行时的优化正在悄然提升开发工具的性能。

Simon Willison

19th July 2026

In Rewriting Bun in Rust Jarred Sumner made the following claim:

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.

I decided to have a poke at my own Claude Code installation to see if I could find evidence that it was using Bun written in Rust.

I found these two commands convincing:

strings ~/.local/bin/claude | grep -m1 'Bun v1'

For me this outputs Bun v1.4.0 (macOS arm64). 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.

(Update: The Rust version has been released as Bun canary - running bun upgrade --canary will install this release.)

strings ~/.local/bin/claude | grep -Eo 'src/[[:alnum:]_./-]+\.rs'

This outputs a list of 563 filenames, starting with these:

src/runtime/bake/dev_server/mod.rs
src/runtime/bake/production.rs
src/bundler/bundle_v2.rs

It looks like Bun in Rust is indeed being run in production across millions of different devices. Like Jarred said, "Boring is good".

Update: Here's a neat trick from Ajan Raj:

cat > /tmp/bun-version.ts <<'EOF'
console.log("embedded bun:", Bun.version);
process.exit(0);
EOF
BUN_OPTIONS="--preload=/tmp/bun-version.ts" claude --version

This outputs 1.4.0 for me.

Here's the commit from May 17th that updated the version in package.json to 1.4.0. That version hasn't been changed since then, but also hasn't yet made it into a tagged release outside of canary.

需要完整排版与评论请前往来源站点阅读。