AI产品精选

Claude Code 改用 Rust 版 Bun,启动快 10%

Claude Code uses Bun written in Rust now

精选理由

Claude Code 偷偷换上了用 Rust 重写的 Bun,启动快了 10%,而且几乎没人发现,这才是扎实的工程优化。

AI 摘要

Anthropic 的 Claude Code 从 v2.1.181(6月17日发布)起使用用 Rust 重写的 Bun。相比原版 Bun,Linux 启动速度提升 10%。作者通过检查二进制文件,发现内置的 Bun 版本为 v1.4.0(尚未公开发布)以及 563 个 Rust 源文件路径。该变更已部署到数百万设备上。Jarred Sumner 表示,这次升级几乎没有用户察觉。

原文 · Simon Willison’s Weblog

Claude Code uses Bun written in Rust now

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. 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". Tags: bun , rust , anthropic , claude-code