Bun v1.4 Lands After an 11-Day AI Rewrite from Zig to Rust
A JavaScript runtime that installs dependencies 5x faster than npm, starts in 5ms, and bundles a native image processor, SQL client, and headless browser eliminates entire categories of third-party packages. The Rust rewrite also removes the memory-safety risks that made earlier Bun versions a gamble for production.
Bun v1.4 is the first production release running entirely on a Rust engine, replacing the original Zig codebase. The migration, driven by up to 64 Claude agents, turned 535,496 lines of Zig into over a million lines of Rust in under two weeks. The result is a 20% smaller binary, a drop in Bun.build() memory leaks from 6,745 MB to 609 MB, and a p99 CPU usage reduction from 24% to 10% in Anthropic's own Claude Code project.
The release also deepens Bun's native toolchain, baking in image processing (7x faster than sharp), headless browser testing, SQL clients for four databases, cron jobs, and archive handling. These additions push Bun closer to its goal of making node_modules largely unnecessary.
Benchmarks against Node.js v26 show a cold start of ~5.1ms versus ~19ms, HTTP throughput of 290k req/s versus 71k req/s, and install times that are 5x faster than npm on a fresh T3 Stack project. TypeScript support includes JSX, path aliases, enums, and namespaces without extra configuration, though static type checking still requires tsc --noEmit.
The 13,000 unsafe blocks in the AI-generated Rust code and the lack of human review on the rewrite PR make this a high-stakes bet on AI-assisted systems programming that paid off in benchmarks but leaves open questions about long-term maintainability.
Bun's strategy of absorbing common tooling into the runtime itself—image processing, SQL, headless browsing—treats package ecosystems as a liability rather than an asset, which is a fundamentally different philosophy from Node.js and Deno.
The performance gap between Bun and Node.js is now wide enough that CI/CD pipeline cost savings alone could justify a switch, even for teams that keep Node.js in production.