Claude Code 现使用 Rust 编写的 Bun
Claude Code uses Bun written in Rust now
Jarred Sumner 在博文中称,Anthropic 的 Claude Code v2.1.181(2025年6月17日发布)及后续版本使用了 Bun 的 Rust 移植版。通过 `strings` 命令检查 `~/.local/bin/claude` 发现,其搭载了未正式发布的 Bun v1.4.0(GitHub 最新为 v1.3.14),并输出 563 个 `.rs` 源文件路径。启动速度在 Linux 上提升 10%,但整体表现平稳。
在《用 Rust 重写 Bun》一文中,Jarred Sumner 声称:Claude Code v2.1.181(2025年6月17日发布)及后续版本使用了 Bun 的 Rust 移植版。启动速度在 Linux 上提升了 10%,但除此之外几乎无人察觉。平淡无奇是好事。我决定检查一下自己的 Claude Code 安装,看看能否找到它使用 Rust 版 Bun 的证据。以下两条命令很有说服力:
strings ~/.local/bin/claude | grep -m1 'Bun v1'
输出结果为 Bun v1.4.0 (macOS arm64)。GitHub 上 Bun 的最新发布版本是 2025年5月12日的 v1.3.14,因此 Claude 中出现的 v1.4.0 版本号表明他们搭载了一个尚未正式发布的 Bun 预览版。
strings ~/.local/bin/claude | grep -Eo 'src/[[:alnum:]_./-]+\.rs'
输出了 563 个文件名,开头部分如下:
src/runtime/bake/dev_server/mod.rs
src/runtime/bake/production.rs
src/bundler/bundle_v2.rs
看来 Rust 版 Bun 确实已在数百万台不同设备上投入生产环境运行。正如 Jarred 所说:"平淡无奇是好事。"
标签:bun、rust、anthropic、claude-code、jarred-sumner