Zig‑Based Buz Revives Bun with Sub‑Second Incremental Builds

Buz, a Zig‑based fork of Bun, inherits the last Zig commit, slashes incremental build time to under one second, removes over 11 000 dead‑code lines, and enforces AI‑assisted contributions, but remains an experimental project far from production‑ready replacement.

Node.js Tech Stack
Node.js Tech Stack
Node.js Tech Stack
Zig‑Based Buz Revives Bun with Sub‑Second Incremental Builds

Buz is a new project that picks up the final Zig commit of Bun and aims to provide a modern Zig implementation that can directly replace Bun.

Timeline and context

In early May, Jarred Sumner said the Rust rewrite of Bun was a personal experiment that might be discarded, but after test pass rates rose, he merged the Rust version into the main line on May 14. The migration generated 6 502 commits and added over one million lines of code, yet the latest stable GitHub release remains the May‑issued Bun v1.3.14, the last Zig‑based version.

Buz appears at this transition point: instead of rewriting the JavaScript runtime from scratch, it continues to maintain the Zig code left by Bun.

Sub‑second incremental builds

The author moved the entire build graph into build.zig, incorporating built‑in dependencies such as JavaScriptCore and ICU, and added a few patches for incremental builds. The incremental build can be started with: ./zig build --watch -fincremental According to the author, the incremental build finishes in less than one second, with the mold linker accounting for about 60 % of the time; further improvements in Zig’s linker could bring the time down to roughly 300 ms.

Concrete improvements

Removed more than 11 000 lines of dead code, continuing to clean up technical debt left by the older Bun.

Imported the new Rust‑based Bun tests to catch missing functionality and fixes.

Increased reliance on the Zig standard library, replacing custom implementations that are no longer needed.

Continues to track upstream changes; the repository still receives commits related to the filesystem, hashing, and command‑line handling.

Within a week of being public, the GitHub repository earned 190 stars. Language statistics show roughly 60 % Zig and 26 % C++ code, highlighting that even with Zig or Rust as the outer language, core components like JavaScriptCore remain largely C/C++.

AI‑assisted contribution rule

The repository currently requires that all contributions be assisted by a large language model (LLM). The author explains that manually reviewing the ~600 k lines inherited from Bun would likely exhaust maintainers before any results are seen, so AI is used to perform bulk clean‑up while humans guide direction, reduce technical debt, and verify correctness. Contributions must also pass Sol Max or Fable Max checks before the rule is lifted.

Community reaction

Jarred Sumner responded on X, noting that Bun recently removed about 39 000 dead‑code lines and that Claude is scheduled to regularly search for and delete dead code. Bun supports Linux, Windows, macOS, FreeBSD, Android, and both x86_64 and ARM64 architectures, meaning many parts of the codebase are platform‑specific.

Current limitations

Only local builds and tests for x86_64-linux-gnu are supported.

A large number of upstream Bun test cases still fail.

The JavaScriptCore version used is outdated and lacks recent security patches.

Known vulnerabilities remain unfixed; the README warns against production use.

No formal releases have been published; the project functions as an experimental playground.

Consequently, Buz is far from being a drop‑in replacement for Bun. The biggest upcoming challenge is keeping pace with Bun’s rapid development—each new Node.js API, cross‑platform fix, or JavaScriptCore upgrade requires a corresponding update in Buz.

Nevertheless, Buz is worth watching. Bun’s shift from Zig to Rust demonstrated that AI can compress a massive language migration into a matter of days. Buz now asks whether moving an existing codebase to modern Zig, revamping the build system, and continuously clearing technical debt can yield a more maintainable version of Bun.

Buz:Zig 版 Bun 回来了,增量构建不到 1 秒
Buz:Zig 版 Bun 回来了,增量构建不到 1 秒
Buz 在 Ziggit 社区公开亮相
Buz 在 Ziggit 社区公开亮相
Buz GitHub 仓库仍在密集更新
Buz GitHub 仓库仍在密集更新
Jarred Sumner 回应 Buz 删除死代码的讨论
Jarred Sumner 回应 Buz 删除死代码的讨论
Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

incremental buildAI-assisted developmentZigruntimeBun
Node.js Tech Stack
Written by

Node.js Tech Stack

Focused on sharing AI, programming, and overseas expansion

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.