Bun 1.4 Ships as First Stable Release Built on Its Rust Rewrite, Cutting Package Installs 30x and Idle CPU 5x
Bun 1.4, released August 20, is the first stable version built entirely on the runtime's contested Rust rewrite, delivering 30x faster package installs and 5x lower idle CPU usage.
Overview
Bun 1.4, released August 20, is the first stable release built on Bun’s Rust rewrite of its runtime, package manager, bundler and test suite, which previously ran on Zig. According to Bun’s official release announcement, the update reduces idle CPU usage by 5x for small applications, cuts HTTP server memory usage by 13% to 48%, and makes a fresh-checkout package install 30 times faster than npm.
What We Know
A Rust runtime, months after a contested rewrite
Bun creator Jarred Sumner used Anthropic’s Claude to port the JavaScript runtime from Zig to Rust, and the resulting pull request merged onto Bun’s main branch in May. According to The Register, the port took just 11 days and cost about $165,000 at API pricing. The speed drew praise from HashiCorp co-founder Mitchell Hashimoto, who wrote on X that “there’s absolutely no way an engineer with that salary would’ve been able to achieve the milestones Claude did in 11 days,” as reported by The Register. Zig creator Andrew Kelley was more critical, arguing the rewrite reflected “the diverging value systems of the two projects” and writing, “the argument for shipping all the million lines of unreviewed code is that the test suite is good enough to catch everything.” He added, “It’s not sufficient to catch bugs in Zig code but it is sufficient to catch bugs in [a] million lines of unreviewed slop?” according to The Register.
Bun 1.4 is the first release built entirely on that Rust codebase, though Bun’s release announcement notes that “Claude Code has been using Bun’s Rust port for months now, and Prisma launched Prisma Compute on it” ahead of this release.
Performance and package manager changes
According to Bun’s release announcement, for the application Claude Code — described in the post as “a large long-running application built on Bun” — production CPU usage dropped by 2x, with p99 falling from 24% to 10% and p50 from 5.8% to 2.5%. Memory usage for HTTP servers built on Bun fell between 13% and 48% depending on the framework, with Fastify seeing a 48% reduction and Next.js server-side rendering settling at 238 MB under sustained load. On Windows, Bun 1.4 starts 2.5 times faster than the prior release, at 15.5 milliseconds; on Linux it starts twice as fast, at 5.1 milliseconds. Compiled binaries are up to 17% smaller on Linux and Windows, Bun’s release announcement says.
The package manager, bun install, also changed. On a fresh checkout with a warm cache, an install completed in 251 milliseconds versus 7.61 seconds for npm — a 30-times difference — while a first install with no cache at all was 15 times faster than npm, according to Bun’s release announcement. The bun install --linker=isolated mode now uses a shared global virtual store: packages are extracted into Bun’s cache once and then symlinked into each project’s node_modules/.bun/ directory instead of being copied on every install, which Bun’s release announcement says makes CI installs up to 7 times faster. The release also adds the commands bun audit fix, bun dedupe, and bun prune.
New terminal and CLI built-ins
The release adds Bun.Terminal, described by Bun’s release announcement as “a built-in pseudo-terminal, so you can drive bash, vim, or htop from JavaScript without node-pty,” working across Linux, macOS, and Windows. It also adds Bun.cron(), which registers scheduled jobs directly with the operating system — crontab on Linux, launchd on macOS, and Task Scheduler on Windows — plus bun run --parallel and bun test --parallel for running package scripts and test suites concurrently. Bun.WebView (headless browser automation), Bun.Image (image processing), and Bun.markdown (a Markdown parser) round out a set of built-in APIs that Bun’s release announcement says eliminate 15 external dependencies, including sharp, puppeteer, marked, node-cron, and node-pty, from typical projects.
On the compatibility side, Bun 1.4 adds 1,517 newly passing tests from the Node.js test suite and fixes more than 2,900 issues, per Bun’s release announcement. The release also adds support for standard TC39 decorators, experimental HTTP/3 support in Bun.serve(), and compatibility improvements for Next.js 16.3 and Playwright.
What We Don’t Know
All of the performance figures in Bun’s release announcement come from Bun’s own benchmarks; no independent third-party benchmark of Bun 1.4 has yet corroborated them. It is also not yet clear whether the concerns Andrew Kelley raised in July about insufficient review of the AI-generated Rust code have been addressed in the run-up to this stable release, since that assessment has not been revisited by outside reviewers since the 1.4 launch.