←新闻详情

DevClass更新于 10月21日 22:36

Zig 作者称 Bun 用 Claude 完成的 Rust 重写是未经审查的劣质代码

Zig creator calls Bun's Claude Rust rewrite 'unreviewed slop'

AI 导读

Bun 创始人 Jarred Sumner 上周宣布用约 50 个 Claude Code 工作流、11 天将 Bun 从 Zig 移植到 Rust,生成超百万行 Rust 代码,按 API 定价估算花费约 16.5 万美元,并通过了 Bun 超百万条断言的测试套件。Zig 作者 Andrew Kelley 发文批评这是未经审查的劣质代码,认为 Bun 长期存在激进发版、错误处理差和技术债问题,并质疑若测试套件无法发现 Zig 代码中的 bug,又如何能保证百万行未经审查的 Rust 代码质量。Zig 项目此前以不接受 AI 贡献为由,拒绝了 Bun 团队提交的改进。

推荐理由

AI 评分 70

Bun 用 Claude 智能体 11 天完成 Zig 到 Rust 重写,Zig 作者质疑百万行未审查代码的工程风险。

主题

标签

正文

当前显示原文,中文全文译文尚未就绪。

AI/ML

An AI rewrite of a popular Anthropic-owned JavaScript runtime and toolchain has sparked praise for the speed of its execution, but also criticism of the coding practices behind the project itself.

Last week, Bun creator Jarred Sumner announced that he ported Bun from the Zig programming language to Rust in only 11 days, using a fleet of Claude agents running in parallel. The work cost an estimated $165,000 at API pricing, suggesting that software revisions previously considered too large to undertake could actually be feasible now with AI.

Sumner said the port was necessary given the growing number of bugs Bun users were finding, including one implicated in the recent Claude Code source leak.

But the creator of Zig, Andrew Kelley, didn’t want his project to be seen as the culprit behind Bun’s woes, which he blames on Sumner’s bad programming practices.

For Kelley, the move to Rust was not about the feature differences between the two languages, or even the use of AI, but rather “the diverging value systems of the two projects,” he wrote.

Bun in the oven

Bun is a JavaScript suite consisting of a runtime, package manager, bundler and test runner. Some developers like it because it is a fast one-stop shop that plays well with Node.js.

To make Bun speedy, Sumner used Apple's low-memory fast-start WebKit JavaScriptCore (JSC) engine, rather than Google’s stock V8 engine. He used the up-and-coming Zig because he appreciated its performance and low-level control.

Anthropic acquired Bun in December 2025. The company built its core state machine on Bun.

By then, Sumner had also grown to appreciate AI’s coding abilities, and was using it heavily in the upkeep of Bun. By the time of acquisition, a Claude Bot called RoboBun had been doing a lot of the heavy lifting in the Bun repo. It supplied the most merged PRs of any contributor, fixing bugs and remediating test failures.

But as Bun’s user base grew, more cracks started appearing in the code. Users found issues across the software. Anthropic’s 512,000-line code leak in March? That was Bun’s fault, thanks to a bug in the bundler that generated source maps during builds even when told not to, NodeSource reported.

All these bugs weren’t Zig’s fault, Sumner explained in a blog post last week detailing the migration. Bun’s architecture mixed garbage collection and application-driven memory management. Sumner admitted that Zig wasn’t designed for that task. Rust was just better at automating memory management.

The Rustification of Bun

Rewriting 500,000 lines of Zig into another language would be a gargantuan undertaking if done by hand. “A rewrite in another language would take a small team of engineers a full year. It would mean freezing bugfixes, security fixes or feature development for that time,” Sumner wrote.

Instead, Sumner went with Claude. He spun up about 50 dynamic Claude Code workflows, reaching a peak of about 1,300 lines of code per minute and generating over a million lines of Rust code. The job took 11 days and cost about $165,000 at API pricing. Claude Fable did most of the heavy lifting.

The Rust-based Bun was then subjected to Bun's exhaustive test suite of more than one million assertions. According to Sumner, it passed 100 percent of those tests across all supported platforms without skipping or deleting any.

“There’s absolutely no way an engineer with that salary would’ve been able to achieve the milestones Claude did in 11 days,” an impressed HashiCorp co-founder Mitchell Hashimoto noted on X.

Zig zags

But does Bun’s speed of execution betray the core tenets of good software development?

One person not impressed has been Zig’s Kelley, who shared his misgivings in an impassioned post entitled “My Thoughts on the Bun Rust Rewrite."

Even before the Anthropic acquisition, “we became increasingly horrified at the programming practices we saw in Bun's codebase,” Kelley wrote. Bun was one of the largest and highest profile projects using Zig and, up until the Anthropic acquisition, a regular financial contributor to The Zig Software Foundation.

In Kelley’s view, the project aggressively released new features, resulting in piled-up bugs, bad error-handling code, and technical debt.

Sumner “was already writing slop well before he had access to LLMs,” Kelley quipped. He speculated that Sumner may have been under pressure to meet business objectives rather than technical ones, a pressure that increased with Anthropic’s acquisition.

In fact, Bun’s codebase had grown so suspect in Kelley’s estimation that Bun parting with Zig was good news. As he put it, no longer would “the publicly presumed poster child for Zig programming language actually [be] the prime example of How Not To Write Zig Code,” he wrote.

The Bun team also tried to upstream some of its AI-assisted work to Zig, to no avail. Leading up to the Bun rewrite, the team maintained a fork of Zig that it said improved debug compilation speed fourfold, as eagle-eyed Reg reporter Tim Anderson revealed in May. But the Zig project would not accept Bun’s changes, citing a policy of not accepting AI-based contributions.

Zig had been getting an influx of LLM-generated submissions, most of dubious quality. This lack of engineering oversight around AI-generated code would lead to countless problems down the road, Kelley reasoned.

Kelley pointed out that if Bun’s tests missed these bugs in Zig, how would they be caught in unsupervised Rust code?

“The argument for shipping all the million lines of unreviewed code is that the test suite is good enough to catch everything,” he wrote. “It's not sufficient to catch bugs in Zig code but it is sufficient to catch bugs in [a] million lines of unreviewed slop?”

When you just need to build a tiny desktop app: TinyJS

October 13, 2026

Valen creator drives 'Golden Spike' to connect new languages with Rust

September 26, 2026

Microsoft agentically ports Copilot runtime to Rust for $120K

September 19, 2026

Apple iPhone Duo makes developers think in folds

September 16, 2026

JavaScript installer pnpm recast in Rust because ECMAScript can't keep up

September 5, 2026

Kubernetes cleans house, bins legacy kube-dns, IPVS, and cgroup v1

August 27, 2026

How Cursor beat Git's scalability shortcomings

August 24, 2026

Go updates may delight diehard gophers but displease AI overlords

August 21, 2026

SvelteKit 3 puts heat on Next.js with radical approach to RPCs

August 20, 2026

Almost nobody pays attention to web standards anymore

August 18, 2026

ChainDrop worm crawls into npm supply chain, evades standard defenses

August 16, 2026

Node.js creator liberates Durable Objects from Cloudflare

August 13, 2026

AI titans to tidy agent frontier with plugin prescription

August 8, 2026

Platform Engineering 2.0: your platform was built for a different era. AI just exposed it

August 6, 2026

Next.js 16.3 aims to reduce dreaded FATAL ERROR messages

August 5, 2026

Dev who gave HashiCorp its name returns with a faster terminal multiplexer

August 1, 2026

How AI drove Shopify back to clean code

Turns out, agents just want the same things as humans: easily-readable code, explicit contracts, and helpful feedback

July 26, 2026

Zig creator calls Bun's Claude Rust rewrite 'unreviewed slop'

July 15, 2026

HTTP gets a QUERY method so complex searches can stop pretending to be POST

July 14, 2026

Speedier type checks in TypeScript 7.0 as first stable Go release ships

July 10, 2026

GitHub cuts short offer to burn repos on CD after mockery ensues

A purported jab of Sony's physical media phase-out blows up on GitHub itself

July 7, 2026

.NET's long term support is not long term enough, dev complains

June 30, 2026

来源

DevClass