A shot-scraper-style JSON API on Bun 1.4's new Bun.WebView
- Source
- simonwillison.net
- Publisher
- Simon Willison
- Date
Context
Simon Willison had Claude Code for web build a small browser-automation service around Bun 1.4's experimental Bun.WebView interface. Willison's write-up describes a TypeScript of roughly 150 lines that loads pages, runs JavaScript and returns screenshots or structured results, using one browser tab per request.
The service works without Puppeteer or Playwright, but a browser engine still does the page rendering. Bun can use macOS WebKit or control a local Chromium . Willison reports that the prototype appears to need a 192–256 MB container to run a full Chrome against complex pages, tested using cgroups. That is an about this prototype and workload, useful for understanding its footprint rather than a universal browser-service requirement.
- API — Application programming interface: the agreed set of operations, inputs and outputs through which one piece of software uses another.
- Process — A running instance of a program, with its own working memory, open files and identity.
- Observation — The result the harness returns into the context after executing a tool: contents, a listing, a status or an error.
- Dependency — Anything a program needs to run that its author did not write: the language, its standard library, or a separately installed package.