My thoughts on the Bun Rust rewrite

My thoughts on the Bun Rust rewrite

关于 Bun 重写为 Rust 的个人看法

Andrew Kelley - My Thoughts on the Bun Rust Rewrite (2026 Jul 09) Andrew Kelley - 关于 Bun 重写为 Rust 的个人看法(2026 年 7 月 9 日)

Context: Rewriting Bun in Rust 背景:将 Bun 重写为 Rust

History 历史

When Jarred joined the Zig community about 5 years ago, I described him as someone who had strong “beginner energy”. That is, he moved fast and tried a lot of different stuff, jumping head first into problems that he was not yet equipped to solve, leading to mediocre outcomes in terms of engineering, but learning a whole heck of a lot in the process. I see it as quite a healthy attitude, particularly for young people and students. This is the best way to level up and learn new things. 大约 5 年前,当 Jarred 加入 Zig 社区时,我形容他是一个拥有强烈“新手能量”的人。也就是说,他行动迅速,尝试各种不同的事物,一头扎进他尚未具备能力解决的问题中。虽然从工程角度来看,结果往往平平,但他在这个过程中学到了非常多东西。我认为这是一种非常健康的态度,尤其是对于年轻人和学生而言。这是升级打怪、学习新知识的最佳途径。

As he focused his efforts on Bun he began to attract attention. JavaScript being the most popular programming language in the world, there are a lot of potential eyeballs on a promising new toolchain. This attention could have been harnessed in a few different ways. For example, he could have easily achieved a solid living via crowdfunding, even for San Francisco standards. But having graduated from the Thiel Fellowship school of thought rather than university, he was essentially groomed from a young age into uncritically embracing the Silicon Valley mindset, and he took venture capital. 随着他将精力集中在 Bun 上,他开始受到关注。JavaScript 是世界上最流行的编程语言,一个有前途的新工具链自然会吸引大量目光。这种关注本可以通过多种方式加以利用。例如,即使以旧金山的标准来看,他也可以通过众筹轻松获得优渥的生活。但由于他毕业于“泰尔奖学金”(Thiel Fellowship)式的思维模式而非传统大学,他从小就被培养成不加批判地接受硅谷思维,于是他选择了接受风险投资。

From the beginning, Jarred was appreciative towards the Zig project. He credited Zig on the Bun website for the project’s performance achievements. He set up a monthly donation to Zig Software Foundation that amounted to $60,000 per year. He didn’t have to do either of those things, but he did, and it was pretty cool of him. Even in his blog post that I’m referencing, he expresses what I perceive as sincere gratitude towards the Zig project. 从一开始,Jarred 就对 Zig 项目心存感激。他在 Bun 的官网上将项目的性能成就归功于 Zig。他设立了每月向 Zig 软件基金会(ZSF)的捐款,每年总额达 6 万美元。他本不必做这些,但他确实做了,这非常酷。即使在我引用的那篇博客文章中,他依然表达了我所认为的对 Zig 项目真诚的谢意。

However, once Bun became a VC-backed startup, he started racing towards the finish line. Now, instead of working on a free and open source project, learning and growing with the community, Jarred was running a business. It was at this point - when he suddenly became a manager - that this “beginner energy” started to hit differently for me. It’s one thing to choose a poor work-life balance for oneself; a different thing entirely to demand it of others: “Oven is going to be a grind, especially the first nine months or so. If work-life balance means a lot of time spent not working, it’s probably not a good fit.” 然而,一旦 Bun 成为一家由风投支持的初创公司,他就开始向终点线冲刺。现在,Jarred 不再是致力于一个自由开源项目并与社区共同学习成长,而是在经营一家企业。正是在这一点上——当他突然成为一名管理者时——这种“新手能量”对我来说开始变味了。为自己选择糟糕的工作与生活平衡是一回事,但要求他人也这样做则完全是另一回事:“Oven 的工作会很辛苦,尤其是最初的九个月左右。如果工作与生活的平衡意味着花大量时间不工作,那这里可能不适合你。”

Fun fact: people talk to each other. I talked to those who interviewed for a job at Oven. I talked to people who worked there. Those people talked to each other. Everybody talked to everybody. The grapevine was large and healthy and full of juicy grapes, and all those grapes contained the juice of the same message: Jarred was a stinky manager. Poor communication, unrealistic expectations, low empathy, no experience. Just a total shit show, from an employment perspective. 有趣的事实是:人们会互相交流。我与那些在 Oven 面试过的人谈过,也与在那里工作过的人谈过。这些人之间也会互相交流。每个人都在和每个人说话。小道消息渠道既庞大又活跃,充满了“多汁的葡萄”,而所有这些葡萄里都包含着同样的信息:Jarred 是个糟糕的管理者。沟通不畅、期望不切实际、缺乏同理心、没有经验。从雇佣的角度来看,简直是一场彻头彻尾的灾难。

Consequently, although Zig community members were eager to find work coding in Zig on the clock, most of the talent pool steered clear of Oven and Bun. At the same time, a rift between Zig and Jarred started widening. His singular focus on productivity and his startup’s exit strategy was increasingly at odds with my longer term vision for the Zig project. I remember he kept nagging me to drop all my other priorities and work on a Language Server Protocol implementation and VSCode integration, while I had bigger plans. 因此,尽管 Zig 社区成员渴望找到一份能用 Zig 进行全职编码的工作,但大多数人才库中的人还是避开了 Oven 和 Bun。与此同时,Zig 和 Jarred 之间的裂痕开始扩大。他专注于生产力和初创公司的退出策略,这与我对 Zig 项目的长期愿景越来越不一致。我记得他一直缠着我,让我放下所有其他优先级事项,去开发语言服务器协议(LSP)实现和 VSCode 集成,而我当时有更宏大的计划。

The main problem, however, was code quality. The Zig team regularly checks in on our users’ projects. We read source code to find out how the language is affecting users, we test changes to see how problematic breakage might be, and we check for performance regressions. We became increasingly horrified at the programming practices we saw in Bun’s codebase. Hacks on top of hacks. Abuse of assertions. Most of all, recklessly speeding past feature after feature with very little time taken for reflection and elimination of bugs and technical debt. Jarred was already writing slop well before he had access to LLMs. 然而,主要问题在于代码质量。Zig 团队会定期查看我们用户的项目。我们阅读源代码以了解该语言如何影响用户,测试变更以查看可能导致的破坏性问题,并检查性能回归。我们对在 Bun 代码库中看到的编程实践感到越来越恐惧。各种补丁堆叠补丁,滥用断言。最重要的是,在几乎没有时间进行反思、消除 Bug 和技术债务的情况下,鲁莽地一个接一个地堆砌功能。Jarred 在接触 LLM 之前就已经在写垃圾代码了。

Now, it’s not our business to police what our users do, but you may have noticed people screaming in our faces about memory safety constantly. You can imagine how we might want to put some social distance between ourselves and a project whose irresponsible software engineering practices invite the exact kind of criticism that people are eager to level. We made futile attempts to guide them towards better programming practices. There were a few exceptional heroes who did their very best in a dysfunctional company. You know who you are. But you can’t stop a rising tide. 当然,监管用户做什么不是我们的职责,但你可能注意到人们一直在我们面前大谈内存安全问题。你可以想象,我们为什么想要与一个项目保持社交距离——因为其不负责任的软件工程实践,恰恰招致了人们急于抨击的那类批评。我们曾徒劳地尝试引导他们采用更好的编程实践。在那家功能失调的公司里,有几位杰出的英雄尽了最大努力。你们知道自己是谁。但你无法阻挡滚滚而来的浪潮。

By this time, we all felt at ZSF that Bun was a net liability, and this was before RoboBun became the #1 contributor. Along with the discomfort of the publicly presumed poster child for Zig programming language actually being the prime example of How Not To Write Zig Code, at some point they would sell out (let’s be honest, their vague “sell some cloud something” business plan was a farce from the get-go), we would receive some negative publicity by proxy, and we’d stop getting that regular donation. 到那时,我们 ZSF 的所有人都觉得 Bun 是一个净负债,而这还是在 RoboBun 成为第一贡献者之前。除了那种不适感——即公众心目中 Zig 编程语言的代言人,实际上却是“如何不写 Zig 代码”的典型反面教材——我们还意识到,他们迟早会卖掉公司(老实说,他们模糊的“卖点云服务”商业计划从一开始就是一场闹剧),我们会被连带受到负面宣传,而且我们也会停止收到那笔定期捐款。

So, when the Anthropic acquisition finally happened, we at ZSF breathed a sigh of relief. When the donation silently stopped, our bank account was ready for it. When they neither canceled their monthly meeting with us, nor showed up, we were not surprised. The relationship was over. The (re)writing was on the wall. 因此,当 Anthropic 的收购最终发生时,我们 ZSF 松了一口气。当捐款悄无声息地停止时,我们的银行账户已经做好了准备。当他们既没有取消与我们的月度会议,也没有出席时,我们并不感到惊讶。这段关系结束了。重写(或改写)的结局早已注定。

Even within a couple days, we already suspected a Rust rewrite was coming. And we were rooting for it! The acquisition by a large AI company was a burden, because even the indirect connection of Claude being written in Bun being written in Zig caused not only a surge of drive-by slop contributions, but also an influx of tasteless AI enthusiasts into Zig communities who had to be informed that it’s antisocial to paste LLM output into forum posts. For a moment, I feared Zig’s identity would become known colloquially as a programming language associated with AI. When Jarred announced the Rust rewrite, we were ecstatic. It seemed too good to be true. I have to admit, I didn’t think the techno… 甚至在几天之内,我们就已经怀疑 Rust 重写即将到来。而且我们对此表示支持!被一家大型 AI 公司收购是一种负担,因为即使是“Claude 用 Bun 编写,而 Bun 用 Zig 编写”这种间接联系,不仅导致了大量随意的垃圾贡献激增,还导致了大量毫无品味的 AI 爱好者涌入 Zig 社区,我们不得不告知他们,将 LLM 的输出粘贴到论坛帖子中是不合群的行为。有一段时间,我担心 Zig 的身份会被通俗地称为与 AI 相关的编程语言。当 Jarred 宣布重写为 Rust 时,我们欣喜若狂。这看起来好得令人难以置信。我必须承认,我没想到技术……