Bun Undergoes Major Rust Rewrite Amid Stability Concerns and Anthropic Integration Questions
The JavaScript runtime Bun is undertaking a significant rewrite, transitioning its core codebase from Zig to Rust. This ambitious project, reportedly leveraging AI agents for the tedious porting task, aims to address long-standing concerns regarding Zig’s “novel issues,” community challenges, and Bun’s own stability, particularly on Windows. While the rewrite demonstrates impressive initial progress, with 99.8% of existing test suites passing on Linux x64, the approach has raised technical eyebrows. The Rust port, currently encompassing over 680,000 lines of code, notably features more than 13,000 instances of the unsafe keyword, a stark contrast to typical idiomatic Rust projects like UV, which has approximately 70 unsafe calls across a substantial codebase. This high count suggests a line-by-line translation rather than a complete architectural rethink, leading to concerns about merely trading known Zig-related problems for an unknown number of new Rust-specific “unsafe” issues.
The rewrite unfolds against a backdrop of increasing community apprehension about Bun’s future direction following its acquisition by Anthropic. Dax from Open Code recently publicly migrated his project from Bun to Node.js, citing persistent Windows stability problems, Electron compatibility, and general uncertainty about Bun’s trajectory. Similarly, an article by William Johnson articulates worries that Bun’s deep integration into Anthropic and its Claude Code product could lead to a shift in development priorities. The perceived “enshittification” of Claude Code raises fears that future Bun development might primarily serve Anthropic’s internal needs, potentially deprioritizing general community bug fixes not directly impacting Claude Code. While Bun’s creator, Jared, affirms that the Rust port will only be merged if it demonstrably improves performance, memory usage, and stability, the fundamental rewrite introduces significant architectural complexities and the potential for new categories of bugs, complicating its evolution as a broad-purpose JavaScript runtime.