Anthropic 旗下 Bun 团队尝试从 Zig 迁移到 Rust
Anthrophic's Bun team trials port from Zig to Rust
Bun 创始人 Jarred Sumner 在 GitHub 提交了一份 Zig 到 Rust 的移植指南,引发项目可能弃用 Zig 的猜测,但他强调并未承诺重写,只是“好奇可用版本会是什么样”。Bun 是 JavaScript 运行时,其团队此前已 fork Zig,借助 LLVM 并行代码生成将 macOS 和 Linux 上的调试编译时间提升 4 倍,但因 Zig 对 AI 贡献的严格禁令无法上游合并。Anthropic 于 2025 年底收购 Bun,并将其用于 Claude Code。
正文
当前显示原文,中文全文译文尚未就绪。
DevOps
Bun creator Jarred Sumner has posted a Zig-to-Rust porting guide, igniting speculation that the project may migrate away from Zig, though Sumner said there is no commitment to rewriting, only that he is "curious to see what a working version of this looks like."
Bun, a JavaScript runtime and toolkit, is a prominent user of Zig, a general-purpose systems programming language designed by Andrew Kelley to improve on C, currently at version 0.16. Building with Zig has been a distinctive feature of Bun against its competitors Node.js, which uses C++, and Deno, which uses Rust.
That said, the Bun team has already forked Zig, claiming a four-times improvement in debug compilation times thanks to the use of parallel code generation with LLVM on macOS and Linux. These improvements cannot be upstreamed to Zig thanks to its strict no-AI policy for issues, pull requests (PRs), and comments on the bug tracker. The reason for the ban, according to Zig Software Foundation member Loris Cro, is that "the reality of LLM-based contributions has been mostly negative for us, from an increase in background noise due to worthless drive-by PRs full of hallucinations... to insane 10,000 line long first time PRs."
Regarding Bun's Zig fork, a core Zig team member commented that "the changes in this Zig fork are not desirable to upstream," citing several reasons, including that "their parallelized semantic analysis implementation will exhibit non-deterministic behavior" and that another enhancement, splitting LLVM's backend output into multiple modules, was a waste of time and that the team was investing in incremental compilation instead, "which can improve compilation speed by orders of magnitude."
Zig's no-AI policy may be embarrassing for Anthropic, which acquired Bun in late 2025 and uses it for Claude Code.
Another issue with Zig is that Kelley is unafraid to make breaking changes to the language, making it harder to rely on for major production projects.
Yesterday, Sumner committed a Zig-to-Rust porting guide to GitHub, explaining that the goal of "phase A" is to capture the logic, even if the Rust code does not compile, and that "Phase B makes it compile crate-by-crate."
Despite this seeming statement of intent, Sumner said on Hacker News that "we haven't committed to rewriting. There's a very high chance all this code gets thrown out completely. I'm curious to see what a working version of this looks like, what it feels like, how it performs."
Although the notion of a port from Zig to Rust has taken the community by surprise, the idea has been reasonably well received. Among Bun users, one comment is that "it always seemed a bit crazy to base your product off a language that is still in beta." Bun is admired for its speed and flexibility, but the project has also been troubled by significant bugs and memory leaks.
One thing is certain: if Bun proceeds with the port, there will be extensive use of AI to implement it. There is precedent elsewhere. Cloudflare reimplemented most of the Next.js API in one week with AI, and the Ladybird browser project ported its JavaScript engine from C++ to Rust in two weeks.
Whether Bun migrates to Rust or not, Sumner is convinced that open source software (OSS) will make increasing use of AI. Commenting on Zig's AI ban, he said on X: "I expect OSS to go the opposite direction: no human contribution allowed." People will still discuss issues and prioritization, he said, "but the actual act of writing code, of submitting PRs, of replaying and addressing feedback, of implementation will be LLMs."
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