---
title: "Claude Code 已内置用 Rust 重写的 Bun"
source: "Simon Willison 博客（Atom）"
source_tier: "t2"
url: "https://simonwillison.net/2026/Jul/19/claude-code-in-bun-in-rust/#atom-everything"
permalink: "https://feed.astralor.com/items/itm_dbd57b2637da08ce64d9881a"
published: "2026-07-19T03:54:09.000Z"
score: 75
channel: "ai"
tags: ["Anthropic","Bun","Claude Code","Rust","启动性能"]
---

# Claude Code 已内置用 Rust 重写的 Bun

## AI 点评

> 这篇文章让我眼前一亮：它没有停留在功能层面，而是深入挖掘了 Claude Code 的一次底层技术切换。对于关注 AI 工具性能优化的开发者来说，这提供了一个难得一见的‘内幕’视角——连 Rust 重写这种变革都能做到用户无感，说明 Anthropic 的工程团队在兼容性和性能平衡上做得很扎实。如果你正在评估是否要用 Rust 重写自己的运行时，建议仔细看看 Willison 的取证方法。

## 速览

Claude Code v2.1.181（6月17日发布）及后续版本使用了用 Rust 重写的 Bun，该版本尚未公开发布（v1.4.0）。作者 Simon Willison 通过字符串扫描命令在本地 Claude Code 二进制中发现了 Rust 源文件路径，证实了这一内部切换。Linux 环境启动速度提升约10%，其他平台感知不明显。Bun 创始人 Jarred Sumner 称“无聊是好事”，强调平稳过渡。

## 关键点

- Claude Code v2.1.181 及之后版本使用 Rust 重写的 Bun
- 作者通过 strings 命令找到 Bun v1.4.0（未发布版本）和 563 个 Rust 源文件路径
- Linux 启动速度提升约 10%，其他平台基本无感知
- Bun 创始人认为这种“无聊”的技术切换是好事

## 全文

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, jarred-sumner

---

引用前请核对原文;本文由星际流动整理:https://feed.astralor.com/items/itm_dbd57b2637da08ce64d9881a
