Building a shot-scraper-style JSON API on Bun 1.4's New Bun.WebView
Score
76介绍了 Bun 1.4 新内置 WebView 的第一手实验,包含具体内存测试数据,提供了其他渠道少见的实操视角。
作者亲手实现原型并给出了实现思路与资源测算,内容具体、可复现。
对需要构建网页加载/JS 执行服务的开发者有直接参考价值,但适用场景较窄。
Bun 1.4 发布当日即跟进报道和实验,时效性极高。
Simon Willison 是知名开发者与博主,实验数据和方法透明,信源可信度高。
Base 84.5 × T2 Source weight ×0.9 = 76
Curation line 70Selected
Why selected
This post timely covers the major Bun 1.4 update and offers reproducible memory test results from hands-on experimentation, providing direct reference value for developers.
AI commentary
「I think the real value here isn't in listing new features, but in turning 'what Bun.WebView can do' into quantifiable deployment data through hands-on testing. For teams building scraping services or AI agent toolchains, that 192MB-256MB memory estimate is far more useful than any marketing pitch.」
Quick overview
Bun 1.4 was released today, marking the first stable version since its Rust rewrite a few months ago. The release notes downplay the rewrite and highlight a wide range of new capabilities, including Bun.WebView, Bun.Image, Bun.markdown, Bun.cron(), and Bun.Terminal, along with 2,900 bug fixes and a significant jump in Node.js compatibility. The author was most intrigued by Bun.WebView, which brings first-class browser automation to Bun via macOS WebKit or by driving a local Chromium through the Chrome DevTools Protocol. To explore this, he used Claude Code for web to build a shot-scraper-style JSON API that loads a web page and executes JavaScript against it. Testing with cgroups shows that a full Chrome instance needs about 192MB-256MB of memory for complex pages, a useful data point for container sizing. The experiment draws on his earlier shot-scraper javascript CLI tool and could make browser automation more accessible within the Bun ecosystem.
- Bun 1.4, the first stable release after the Rust rewrite, adds Bun.WebView and many other built-in features.
- The author built a shot-scraper-style JSON API prototype with Claude Code, using WebView to load pages and execute JS.
- Testing shows a full Chrome instance needs about 192MB-256MB RAM for complex pages, a useful reference for container deployment.
Full text
Showing the source text; the full translation is being generated.
Research: A shot-scraper-style JSON API on Bun 1.4's new Bun.WebView
Today saw the long awaited release of Bun 1.4, the first stable version since the infamous Rust rewrite a few months ago.
Interestingly, the Rust rewrite was downplayed in the release notes, which introduced a bewildering array of new features and claimed 2,900 additional bug fixes:
Bun 1.4 adds +1,517 tests from the Node.js test suite - our biggest jump in Node.js compatibility since Bun 1.0. Bun v1.4 also fixes over 2,900 issues. It reduces idle CPU usage by 5x, reduces memory usage by up to 35%, and starts 50% faster on Linux. It adds
Bun.Image,Bun.WebView,Bun.markdown,Bun.cron(),Bun.Terminal,bun run --parallel,bun test --parallel,bun audit fix,bun dedupe, andbun prune. And it rewrites Bun from Zig to Rust.
Of these the one that most caught my eye was Bun.WebView, which adds first class support for browser automation to Bun core using either macOS WebKit or control of a local Chromium process via the Chrome DevTools Protocol (CDP).
I had Claude Code for web build a prototype of a web API providing the ability to load a web page and then execute JavaScript against it, inspired by my shot-scraper javascript CLI tool - partly to see how much RAM would be needed by such a service.
Here's that TypeScript server implementation, which appears to need a 192MB-256MB container to run a full Chrome against complex web pages - tested using cgroups.
Tags: browsers, javascript, ai, rust, typescript, generative-ai, llms, coding-agents, bun
Related items
84
FeaturedHow to Evaluate LLMs Before Production: Lessons from GitHub
GitHub 实战分享:如何在生产前评估 LLM
This practical guide stands out because it comes from a real security scenario, not theoretical reasoning. Teams integrating LLMs into production, especially those working on security scanning and data-sensitive engineering, should definitely read it. I recommend designing evaluation sets around your own business data rather than blindly adopting public benchmarks.
84
FeaturedRuff v0.16.0 Released: Default Rules Jump from 59 to 413, CI Pipelines Need Attention
Ruff v0.16.0 发布:默认规则从59条激增至413条,CI工作流需关注
For Python developers, this is an unmissable update signal. The significant increase in Ruff's default rules means we can no longer ignore potential issues in our code, and AI fix tools can lower the upgrade cost. Notably, Astral (OpenAI) is deeply integrating AI coding capabilities with static analysis tools, which may become the norm in future engineering practices.
81
FeaturedOpenRouter Team AI Spend Controls Setup Tutorial
OpenRouter 团队 AI 支出控制设置教程
As AI API spending balloons, OpenRouter's official governance tutorial signals that platforms are taking enterprise cost management seriously. Rather than waiting for bill shock, teams should configure these guardrails early. This is especially valuable for platform engineers and finance owners overseeing AI usage.
81
FeaturedFireside Chat with Anthropic's Claude Code Team: How AI Coding Agents Reshape Software Development
Anthropic Claude Code 团队炉边谈话:AI 编码代理如何重塑软件开发
The value of this fireside chat lies not in repeating Claude Code's features, but in revealing how Anthropic internally redefines engineering processes—shifting from 'execution-heavy' to 'taste-heavy'. For anyone in an AI product team, Cat's point that 'product taste outweighs execution' is worth pondering. Thariq's subversion of the 'never rewrite' rule also reminds us that traditional software engineering principles are being rewritten by AI capabilities.
80
FeaturedGPU Management: Why Idle GPUs Are the New Grounded Aircraft
GPU管理:闲置GPU为何成为新的停飞飞机
This blog is worth reading because it elevates GPU resource management to an economic perspective, using the grounded aircraft analogy to visualize waste. Teams using Kubernetes for GPU clusters can immediately try the recommended tools. However, users in China should note the compatibility of some tools outside AWS/GCP environments.
80
FeaturedAn Opinionated Guide to Which AI to Use to Do Stuff
一份主观指南:如何选择AI来做事情
This blog post is Simon Willison's refined take on Ethan Mollick's guide, ideal for developers and power users struggling to choose between ChatGPT and Claude and their various agent modes. It cuts through the confusion of product naming and unintuitive platform differences, offering clarity that saves hours of trial and error.
80
FeaturedPyPI Implements 14-Day Upload Window to Prevent Supply Chain Poisoning
PyPI 实施14天上传期限以防止供应链投毒
This is a critical message for the Python ecosystem. If you maintain any PyPI project, check your release workflow immediately — the 14-day window means you can no longer patch or overwrite files on old releases; you must publish a new version. For security teams, this is a best practice in supply chain security worth emulating by other package managers.
80
FeaturedLobsters Community Successfully Migrates to SQLite: A Win for Single-Server Architecture
Lobsters 社区成功迁移至 SQLite:单服务器架构的胜利
This migration case is particularly noteworthy because it challenges the conventional wisdom that small sites must adopt distributed databases. Lobsters proves that in 2026, a single server with SQLite can handle an active community. For startup teams struggling with overcomplicated tech stacks, this is an excellent reference for cost reduction and efficiency improvement.