Bun 1.4: The Runtime Absorbs Your Dependencies

Bun 1.4 shipped on August 20, 2026 — the first production release of the runtime rewritten from Zig to Rust. Three weeks later, on September 4 and 5, versions 1.4.1 and 1.4.2 followed with regression fixes. Both halves of that sequence are worth reading, and the second half is the one most upgrade guides skip.

The problem: a toolchain assembled from strangers

Take an ordinary service. It resizes uploaded images, renders markdown, runs an hourly refresh job, and loads a page to capture a preview. In a typical Node.js stack that is sharp, marked, node-cron and Puppeteer — four direct dependencies that pull in hundreds of transitive packages plus a browser download nobody on the team has audited.

That tree is exactly where the npm incidents of the last two months lived: import-time malware that runs before your code does. Pinning, allowlists and lockfile discipline all help, but they manage the tree rather than shrink it.

Bun 1.4 proposes a different move: pull the capability into the runtime, where it ships and is versioned with the binary.

What changed

Fifteen commonly used npm packages now have built-in equivalents. The most surprising is browser automation.

typescript
await using view = new Bun.WebView({ width: 1280, height: 720 });

await view.navigate("https://example.com");
await view.click("a[href='/docs']");
const title = await view.evaluate("document.title");

await using disposes the view when the scope exits. On macOS it drives system WebKit; elsewhere it controls a local Chromium over the Chrome DevTools Protocol. No Puppeteer, no Playwright, no postinstall step.

The rest follows the same shape — capability first, dependency never:

typescript
await Bun.file("upload.jpg")
  .image()
  .resize(1024, 1024, { fit: "inside" })
  .webp({ quality: 85 })
  .write("thumb.webp");

Bun.cron("0 * * * *", () => refreshCache());

Bun.markdown parses to HTML, ANSI for terminals, or React components. Bun.Terminal opens a pseudo-terminal without a native addon. On compatibility, 1,517 additional tests from the Node.js suite now pass, core modules such as http, fs and stream sit around 97%, and the runtime reports itself as Node.js 26.

The release also claims a 5× reduction in idle CPU, up to 35% less memory for HTTP servers, 50% faster startup on Linux and 2.5× on Windows, with bun test --parallel measured at 3.9× on their suites.

Real-world caveats

Built-in is not free. Simon Willison rebuilt a screenshot-and-scrape JSON API on Bun.WebView in roughly 150 lines with zero dependencies — then measured it under cgroups and found it still wants 192–256 MB of RAM for complex pages, because a full Chrome process is still a full Chrome process. Removing the package did not remove the browser.

New surfaces get patched. Versions 1.4.1 and 1.4.2 fixed an AsyncLocalStorage regression, an Elysia breakage, a hang in @discordjs/ws, CMYK JPEG decoding in Bun.Image, a rare JIT crash and a GC crash on musl. A three-week-old rewrite of an entire runtime earns a canary deployment, not a fleet-wide upgrade.

Fewer dependencies concentrate trust rather than remove it. The same volume of code still runs; it is now signed by one vendor instead of fifteen maintainers. That is a much better shape for auditing and a much worse shape for switching later.

`Bun.WebView` is experimental. Internal tooling and CI are the right first home for it — not a load-bearing production path.

Takeaway

The interesting story in Bun 1.4 is not the Rust rewrite; it is the boundary moving. Capabilities that lived in the dependency tree now live in the runtime, and the supply-chain surface of a service becomes a decision rather than an accident.

Migrate the boring parts first — image processing, markdown, scheduling — because they are the easiest to verify and the largest share of the tree. Measure startup and memory against your own workload instead of the release notes. Keep a Node.js job in CI for one release cycle.

Primary source: Bun 1.4 release notes