HeadlinesBriefing favicon HeadlinesBriefing.com

Buz: Zig-based Bun Fork with Sub-1s Builds

Hacker News •
×

Buz is a work‑in‑progress fork of Bun that uses modern Zig instead of Rust. It builds on the last commit before the Rust rewrite and aims to be a drop‑in replacement while cleaning up a neglected codebase. The project is still early and far from production‑ready.

The entire build graph lives in build.zig, including vendored JavaScript Core sources, enabling sub-1s incremental rebuilds that dramatically improve the dev loop. I have stripped 11,000 lines of dead code and rewritten core parts to rely on Zig’s stdlib. This clean build setup also makes it easier to integrate new features and fix bugs.

Many Rust‑Bun tests have been ported, but most still fail, so maintaining parity with upstream is a treadmill. I’m not accepting human‑coded PRs until the project is sane, and will rely heavily on LLMs to refactor the remaining 600K lines of slop. The use of LLMs is a pragmatic compromise, acknowledging that human sanity can’t be preserved in such tangled code. The goal is to reduce technical debt and produce a pleasant codebase that can be maintained without LLM help in the long run.

Community feedback highlights that Bun’s glue code is largely Zig/C++ and that rewriting dependencies would be a large effort. The focus remains on stability, V8/N‑API compatibility, and showcasing the fast incremental builds. The author invites contributions that identify egregious slop and help modernize the code. Once stable, a demo blog post will showcase the incremental rebuild speed, and more noise will be made as the project gains traction.