Claude Code uses Bun written in Rust now
603 points
• 2 days ago
• Article
Link
Jarred Sumner 最近披露,Claude Code 的 CLI 工具已改用基于 Rust 的 Bun 运行时移植版。虽然这一改动在 Linux 上把启动速度提升了约 10%,但对用户而言基本无感。团队将注意力放在后端稳定性与性能上,而非华而不实的功能更新,体现出一种理念:工程改进应当低调且足够可靠,以致切换过程对用户来说几乎是透明的。
为验证这一点,Simon Willison 检查了他本地安装的 Claude Code 。对可执行文件运行 strings 命令后,他发现了 Bun v1.4.0 。鉴于当时 GitHub 上公开的 Bun 版本仅为 v1.3.14,这表明该应用使用的是基于 Rust 的运行时预发布版,也就是在被广泛发布之前就已交付给用户。
为了进一步确认 Rust 的使用,Willison 在 Claude 的二进制文件中搜索源文件引用。使用 grep 后,他找到数百个以 .rs 结尾的文件路径,进一步证明代码库确实包含 Rust 源文件。这一技术痕迹显示,Bun 的 Rust 实现已经在生产环境中运行,并部署到大量用户中。
这次迁移凸显了用更高效技术替换核心基础设施的实际好处,同时把无缝的用户体验放在优先位置。开发者在后台完成这些升级,顺利实现了一次重大的架构调整而未打扰依赖该工具的用户的日常工作。这种悄然无声的成功说明:在软件开发中,平稳且"无惊无险"的迁移往往才是高质量更新的标志。
Jarred Sumner recently disclosed that the Claude Code CLI tool has transitioned to using a Rust-based port of the Bun runtime. While this change led to a modest ten percent improvement in startup speed on Linux, the shift was otherwise largely transparent to users. This focus on backend stability and performance, rather than flashy feature updates, highlights a philosophy where engineering improvements should be subtle and reliable enough that the transition remains essentially invisible.
Curious to verify this claim, Simon Willison examined his local installation of Claude Code. By using the strings command on the Claude executable, he confirmed the presence of Bun v1.4.0. Because the public release of Bun on GitHub had only reached version 1.3.14 at the time, this discovery indicated that the application was utilizing a pre-release version of the Rust-based runtime, effectively shipping to users before it became standard for the general public.
To further substantiate the use of Rust, Willison searched the Claude binary for source file references. The grep command successfully uncovered hundreds of file paths ending in the .rs extension, confirming that the code base is indeed interacting with Rust source files. This technical footprint provides clear evidence that Bun in Rust is already functioning in a production environment, deployed across a massive user base.
The transition underscores the practical benefits of replacing core infrastructure with more efficient technologies while prioritizing a seamless user experience. By delivering these upgrades under the hood, the developers managed to implement a significant architectural change without disrupting the daily workflows of those who rely on the tool. This quiet success serves as a testament to the idea that, in software development, a smooth, boring migration is often the hallmark of a high-quality update.
835 comments • Comments Link
- 将 Bun runtime 从 Zig 重写为 Rust,并通过自动化 AI agents 迁移:有人认为这是一次务实且成功的迁移,提升了内存安全并保持了运行稳定;也有人批评这是鲁莽的"营销噱头",为追求速度牺牲了代码质量和社区协作。
- 对新代码库的健康状况仍存疑虑:分析者指出存在大量 unsafe 代码块和不符合 Rust 常用写法的代码,这表明项目可能只是把一种内存管理问题换成了另一种,而非实现真正的惯用安全性。
- 关于 Bun 1.4+ 版本控制缺乏透明度,以及在 Claude Code 中使用未发布且带有私有性质的构建,进一步加剧了人们对该项目由社区驱动的开源工程向受企业严格管控工具转变的担忧。
- 批评者认为,大规模自动关闭长期未决的 GitHub issues 以及对原有基于 Zig 的贡献者社区的疏远,预示着项目健康度和可信度在下降——无论该 runtime 在生产环境中是否"基本可用"。
- 许多开发者把"AI 驱动的重写"视为新软件开发范式的前兆:在这种范式下,可读性强、易于长期维护的代码被快速的模型生成迭代和可丢弃的短期产物所取代。
- 关于技术性能的争论持续两极分化:部分用户报告启动更快、整体更稳定;另一部分用户则抱怨在多种终端环境中出现 TUI 渲染严重回退、段错误(segfaults)和资源占用过高的问题。
- 向 Rust 的转向被辩护为 Anthropic 的必要之举,旨在摆脱 Zig 的不稳定性和非内存安全特性,尤其是在该公司以 AI 辅助的开发工作流与该语言关于 AI 生成代码的政策产生冲突的背景下。
- 在重视"持久耐用"软件的群体与更看重上市时间和功能发布速度的群体之间存在根本矛盾:后者越来越依赖 AI agents 来即时修复、适配和重写系统。
- 对自主生成代码合法性及其未来版权归属的疑虑,使得本应属于传统、人类编写的开源仓库的项目面临法律上的不确定性。
- 许多人已将使用 AI 进行大规模代码转换视为行业现实,争论的焦点在于这种"准入门槛"的代价——资本、计算资源以及对以人为中心开发模式的侵蚀——是否值得。
这场讨论反映了传统软件工程价值观与新兴"AI-first"方法论之间的深刻分歧。尽管 Bun runtime 的技术转型被普遍看作是当前模型能力的成功展示,社区对其长期影响仍然高度分化:支持者强调加速开发带来的实际收益和务实取向;批评者则担忧社区能动性的流失、代码质量的蚀变以及与不透明、企业管控的"黑箱"相关的风险。总体共识是,尽管 AI 驱动的重写已成为一种可行的行业策略,但它从根本上改变了开源项目的社会与职业契约,使其从以协作与工匠精神为中心,转向以产出和速度为主要衡量标准的模式。 • The rewrite of the Bun runtime from Zig to Rust via automated AI agents is viewed by some as a successful, pragmatically driven migration that improved memory safety and maintained operational stability, while others consider it a reckless "marketing stunt" that prioritized speed over code quality and community collaboration.
• Skepticism persists regarding the technical state of the new codebase, as analysts point to a high volume of "unsafe" Rust blocks and unidiomatic code that suggests the project has traded one set of memory-management challenges for another rather than achieving true idiomatic safety.
• The lack of transparency regarding the Bun 1.4+ versioning and the use of unreleased, proprietary-feeling builds within Claude Code has fueled concerns about the project's shift from a community-driven open-source endeavor to a tightly controlled, corporate-governed utility.
• Critics argue that the automated, mass-closing of long-standing GitHub issues and the alienation of the original Zig-based contributor community signal a decline in project health and trustworthiness, regardless of whether the runtime "largely works" in production.
• Many developers view the "AI-driven rewrite" as a harbinger of a new software development paradigm where human-readable code and long-term maintainability are subordinated to rapid, model-generated iteration and ephemeral, discardable artifacts.
• Technical performance debates remain polarized; while some users report faster startup times and better overall stability, others complain of significant regressions in TUI rendering, segfaults, and excessive resource consumption when running these tools within various terminal environments.
• The decision to move to Rust is defended as a necessity for Anthropic to move away from the unstable, non-memory-safe nature of Zig, particularly because the company's AI-assisted development workflow clashed with the language's policy regarding AI-generated code.
• A core tension exists between those who value "built-to-last" software and those who prioritize "time-to-market" and feature velocity, with the latter group increasingly relying on AI agents to fix, adapt, and rewrite systems on the fly.
• Doubts regarding the legality and future copyright status of autonomously generated code create legal uncertainty for projects that might otherwise have been traditional, human-authored open-source repositories.
• The effectiveness of using AI for large-scale code transformations is accepted by many as a reality of the current industry, with the primary dispute centering on whether the "cost of entry"—in capital, compute, and the erosion of human-centric development—is ultimately justified.
The discussion reflects a deep divide between traditional software engineering values and an emerging "AI-first" methodology. While the technical transition of the Bun runtime is widely acknowledged as a successful demonstration of current model capabilities, the community remains polarized over the long-term implications of this approach. Proponents emphasize the practical benefits of accelerated development and the pragmatism of choosing tools that enable high velocity, whereas critics fear the loss of community agency, the decay of code quality, and the risks associated with opaque, corporate-governed black boxes. Ultimately, the consensus suggests that while AI-driven rewrites are now a viable industry strategy, they fundamentally alter the social and professional contract of open-source projects, moving them away from collaborative craftsmanship toward a model where output, rather than architecture, is the primary metric of success.