Bun posts Rust porting guide, says rewrite is still half-baked

Zig's no-AI policy is at odds with view that most open source code will be AI-written in future

by · The Register

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." ®