A shot-scraper-style JSON API on Bun 1.4's new Bun.WebView

AI-generated summary of reporting by Simon Willison’s Weblog. Read the original for the full story.

Why it matters

Browser automation in JavaScript servers becomes viable on 192-256MB containers, but this is a research prototype, not a tool anyone should adopt yet.

Read this as

Bun, a tool for running JavaScript programs, released version 1.4 with many updates. A new feature called Bun.WebView lets programs control a web browser directly, so a small server can load a web page and run JavaScript on it. Simon Willison tested this by having the AI tool Claude Code build an example service. His test showed such a service fits in 192-256MB of memory.

Bun 1.4 shipped with over 2,900 bug fixes, 5x lower idle CPU use, up to 35% less memory and a quiet Zig-to-Rust rewrite. Its headline capability, Bun.WebView, enables browser automation inside Bun applications. Willison's prototype demonstrates that a JSON API controlling Chrome fits in a 192-256MB container, making lightweight web-scraping services plausible on cheap infrastructure.

Bun 1.4 introduces Bun.WebView, providing browser automation via macOS WebKit or a local Chromium process driven over the Chrome DevTools Protocol. Willison had Claude Code prototype a shot-scraper-style TypeScript server exposing a JSON API to load pages and execute JavaScript. Running against complex pages under cgroup memory limits, the full Chrome instance fit within 192-256MB. The release also claims +1,517 Node.js compatibility tests and 2,900 fixes.

Read the original

This summary exists to save you time, not to replace the source.

Key terms

Bun 1.4 Bun.WebView Chrome DevTools Protocol Claude Code shot-scraper WebKit

Was this summary useful?

One click, anonymous. It tells us which summaries to re-run.

Related reading

datasette-charts 0.5a0

Datasette Charts 0.5a0 adds calendar heatmaps, box plots and active-over-time charts, enabling richer data visualisation directly in the browser without extra libraries.