Bun 1.4 adds Bun.WebView for built-in browser automation

Bun 1.4 shipped on 20 August 2026 as the JavaScript and TypeScript runtime's first stable release since what the author calls the "infamous" Rust rewrite, which happened a few months earlier. The author notes that the rewrite itself gets little emphasis in the 1.4 release notes, which instead lead with a long list of new features and a bug-fix count. Those release notes, quoted in the article, state that Bun 1.4 fixes over 2,900 issues and adds 1,517 tests from the Node.js test suite, called the biggest jump in Node.js compatibility since Bun 1.0. The same notes claim the release cuts idle CPU usage by 5x, reduces memory usage by up to 35%, and starts 50% faster on Linux, without naming a baseline version for any of the three figures. Among the listed changes is also a rewrite of Bun itself from Zig to Rust. The release adds several new APIs and commands alongside these gains: Bun.Image, Bun.WebView, Bun.markdown, Bun.cron(), Bun.Terminal, bun run --parallel, bun test --parallel, bun audit fix, bun dedupe, and bun prune.

Of everything in the release, the author singles out Bun.WebView as the addition that caught their attention most. It brings first-class browser automation directly into Bun's core: code can drive either macOS's WebKit engine or a local Chromium process controlled through the Chrome DevTools Protocol (CDP), without pulling in a separate automation library.

To try it, the author had Claude Code for web build a prototype web API modeled on their own existing shot-scraper JavaScript CLI tool: a service that loads a web page and then runs JavaScript against it. Part of the point was to measure how much memory such a service would actually need. Testing the resulting TypeScript server with cgroups, the author found it appears to need a 192MB-256MB container to run a full Chrome instance against complex web pages, describing that range as an approximation rather than an exact specification.

Key facts

  • Bun 1.4 shipped on 20 August 2026 as the runtime's first stable release since its Zig-to-Rust rewrite, which the author says happened a few months earlier and got little emphasis in the 1.4 release notes.
  • Bun's release notes claim the update fixes over 2,900 issues and adds 1,517 tests from the Node.js test suite, called the biggest jump in Node.js compatibility since Bun 1.0.
  • The same release notes claim Bun 1.4 cuts idle CPU usage by 5x, reduces memory usage by up to 35%, and starts 50% faster on Linux, with no baseline version named.
  • New additions include Bun.Image, Bun.WebView, Bun.markdown, Bun.cron(), Bun.Terminal, and CLI commands such as bun run --parallel, bun test --parallel, bun audit fix, bun dedupe, and bun prune.
  • Bun.WebView brings built-in browser automation to Bun core, using macOS WebKit or a CDP-controlled Chromium process; the author had Claude Code for web build a shot-scraper-style JSON API prototype on it that appears to need a 192MB-256MB container to run full Chrome, per the author's own cgroups testing.

Why it matters

Bun 1.4 is the runtime's first stable release since a full rewrite of its own codebase from Zig to Rust, a change the release notes barely mention even as they lead with a long list of new features and a claimed bug-fix count. The standout addition is Bun.WebView, which folds browser automation directly into Bun's core instead of leaving it to a separate library: code can drive macOS's WebKit engine or a local Chromium process over the Chrome DevTools Protocol (CDP). Combined with the claimed 5x cut in idle CPU usage, up to 35% lower memory use, and 50% faster startup on Linux, Bun 1.4 reads as a push on both performance and built-in capability, not just a compatibility patch.

Who it affects

Developers who already run Bun gain built-in browser automation without adding a separate library, plus 1,517 new Node.js-compatibility tests that Bun calls its biggest jump since version 1.0, which matters to anyone weighing a move from Node. Linux users specifically get the claimed 50% faster startup. Developers building scraping or browser-automation tools, like the author's own shot-scraper CLI, get a new built-in option to build on, and anyone sizing containers for headless-Chrome workloads gets a concrete data point from the author's own prototype.

How to use it

Bun 1.4 shipped as a stable release on 20 August 2026. Bun.WebView is built into Bun core and works either through macOS's WebKit engine or by controlling a local Chromium process via the Chrome DevTools Protocol (CDP), with no separate automation library required. The author demonstrates one use by having Claude Code for web build a prototype TypeScript server: a JSON API that loads a web page and executes JavaScript against it, modeled on the author's own shot-scraper CLI tool. Tested with cgroups, that prototype appears to need a 192MB-256MB container to run a full Chrome instance against complex pages.

How solid is it

The performance figures, the 5x cut in idle CPU usage, up to 35% lower memory use, 50% faster Linux startup, and the count of over 2,900 issues fixed, all come from Bun's own release notes as quoted in the article, not from independent benchmarks, and no baseline version is named for any of them. There is a small wording gap worth flagging: the release notes themselves say Bun 1.4 "fixes over 2,900 issues," while the article's own lead-in paraphrases that as "2,900 additional bug fixes," and issues logged in a tracker are not automatically the same thing as bug fixes. The one figure that is the author's own measurement rather than a release-notes claim is the 192MB-256MB container estimate, obtained by testing the prototype server with cgroups, though the author does not say what OS or hardware ran that test or which "complex web pages" were used.

Risks and caveats

None of the headline performance claims, the idle-CPU, memory, or startup improvements, name a baseline version, so it is unclear whether they are measured against the immediately preceding Bun release or something older. The Rust rewrite itself is dated only to "a few months" before this release, with no specific version or date given. The prototype's 192MB-256MB figure is described as an approximation ("appears to need"), not a guaranteed spec, and the article gives no pricing, licensing, or platform-availability details for Bun.WebView beyond the choice between macOS WebKit and a CDP-controlled Chromium process.