Bun, the JavaScript toolkit and runtime originally written in Zig, has had its Rust rewrite merged into the main repository in a massive commit adding over one million lines of code. The port was accomplished at remarkable speed using AI coding tools, primarily Anthropic's Claude Code. Bun 1.3.14 was released as the last Zig-based version. The Rust rewrite brings compiler-assisted memory safety, fixing classes of bugs like use-after-free and double-free that had plagued the Zig codebase, while maintaining the same architecture and data structures. Performance is neutral or faster, and binary size shrinks by 3–8 MB. The transition was driven partly by Zig's no-AI policy conflicting with the Bun team's AI-first workflow. A second PR removing 600,000+ lines of Zig was automatically flagged by GitHub as 'AI slop' and closed. The community is watching closely to see whether such a rapid AI-assisted port can avoid introducing new bugs.

4m read timeFrom devclass.com
Post cover image

Sort: