Skip to main content
TechnologyJul 14, 2026· 2 min read

Bun, AI Everywhere, and Rewriting in Rust: The Creator of Zig Blasts Anthropic

Andrew Kelley, the creator of the Zig programming language, has publicly responded to the reasons provided by Anthropic for Bun's (the Node.js competitor JavaScript runtime) migration from Zig to Rust. The reply, coming two months after the official merge of the migration, pulls no punches: it describes the Bun code as pure chaos, caused not by the limitations of Zig but by the team's organizational choices, including the heavy use of artificial intelligence agents to write and review the entire codebase.

Bun, acquired by Anthropic after rapidly growing as a faster alternative to Node.js, claims nearly 100% of its contributions are generated by AI. Zig, on the other hand, explicitly prohibits any AI-written contributions, a philosophical difference that has made the situation even more delicate in the eyes of the open-source community.

The founder of Bun, Jarred Sumner, justified the rewrite in Rust by citing the need to curb memory management bugs that plagued the Zig version, estimated at around four fixes per week. According to Bun, the new code leverages Rust's borrow checker to catch errors like use-after-free at compile time.

Kelley's Critiques: No Analysis of the Downsides Kelley primarily contests how Anthropic communicated its choice. The official migration report lists a long series of benefits gained with Rust, but never addresses the downsides, starting with the increased compilation times typical of a project of this size. For the creator of Zig, the Bun team never truly explored a more economical alternative: adopting a strict style guide, as successfully implemented in TigerBeetle (another project written in Zig) with its TigerStyle approach, based on the static allocation of all memory at startup and prohibiting dynamic allocations afterward.

Several observers suspect that the rewrite is mainly driven by marketing motivations. Anthropic might have seized the opportunity to showcase the capabilities of its Fable model on a real, large-scale project while promoting Rust, a language already adopted internally, at the expense of Zig, whose creator has repeatedly been critical of Anthropic's products.

The text also reveals a contradiction that has not escaped critics. Sumner defends the readability of Rust code compared to a hypothetical solution with Zig-style pointer wrappers, while having stated earlier that the team has not manually written any code for months. Critics point out that if the code is no longer read or written by humans, why still worry about its readability?

The dispute, beyond the technicalities, brings to the forefront a broader theme: how much can artificial intelligence truly replace engineering judgment in a complex project? For Kelley, the rewrite demonstrates the opposite, namely that AI tools alone are insufficient to prevent the very mistakes they are supposed to correct.