Bun 1.4 发布 Bun.WebView,Simon 用它构建 JSON
A shot-scraper-style JSON API on Bun 1.4's new Bun.WebView
Research: A shot-scraper-style JSON API on Bun 1.4's new Bun.WebView
研究:基于 Bun 1.4 新 Bun.WebView 的 shot-scraper 风格 JSON API
Today saw the long awaited release of Bun 1.4, the first stable version since the infamous Rust rewrite a few months ago.
今天迎来了期待已久的 Bun 1.4 发布,这是几个月前著名的 Rust 重写以来的首个稳定版本。
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:
有趣的是,Rust 重写在发布说明中被低调处理,而说明中介绍了一系列令人眼花缭乱的新功能,并声称修复了 2,900 个额外问题:
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, and bun prune. And it rewrites Bun from Zig to Rust.
Bun 1.4 新增了来自 Node.js 测试套件的 +1,517 个测试——这是自 Bun 1.0 以来我们在 Node.js 兼容性上最大的一次飞跃。Bun v1.4 还修复了超过 2,900 个问题。它将空闲 CPU 使用率降低了 5 倍,内存使用量最多减少了 35%,并且在 Linux 上启动速度提升了 50%。它新增了 Bun.Image、Bun.WebView、Bun.markdown、Bun.cron()、Bun.Terminal、bun run --parallel、bun test --parallel、bun audit fix、bun dedupe 和 bun prune。并且它将 Bun 从 Zig 重写为 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).
在这些功能中,最吸引我注意的是 Bun.WebView,它为 Bun 核心添加了对浏览器自动化的第一等支持,可以使用 macOS WebKit 或通过 Chrome DevTools 协议(CDP)控制本地 Chromium 进程。
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.
我让 Claude Code for web 构建了一个 Web API 原型,该 API 提供加载网页然后对其执行 JavaScript 的能力,灵感来自我的 shot-scraper javascript CLI 工具——部分是为了看看这样的服务需要多少 RAM。
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.
以下是那个 TypeScript 服务器实现,它似乎需要一个 192MB-256MB 的容器来针对复杂网页运行完整的 Chrome——已使用 cgroups 进行测试。
Tags: browsers, javascript, ai, rust, typescript, generative-ai, llms, coding-agents, bun
标签:浏览器、JavaScript、人工智能、Rust、TypeScript、生成式AI、LLM、编码代理、Bun
更进一步:量化金融体系
看懂新闻只是起点——沿量化金融路径,把它变成能交付的工程能力