Bun’s maintainers committed a Phase-A porting guide (PORTING.md) to the oven-sh/bun repo, initiating a Zig-to-Rust migration.
Key Takeaways
The commit 46d3bc2 adds PORTING.md and scripts/port-batch.ts, establishing a structured, file-for-file, line-for-line porting process.
Bun’s Zig codebase is large: ~572k lines of Zig across 1,298 files, plus significant C++ and C layers.
Bun has been running a fork of Zig, not upstream, making version tracking and contributions increasingly difficult.
The active porting branch (claude/phase-a-port) already shows 773,950 additions and 151 deletions, indicating Claude is doing bulk translation.
Hacker News Comment Review
Commenters are split on whether AI-driven rewrites preserve codebase understanding; the file-for-file constraint mitigates but does not eliminate institutional knowledge risk.
Zig’s pre-1.0 status and its maintainers’ hard “no AI code” rule (which blocked a Bun upstream PR) are cited as practical motivators beyond pure technical preference.
The non-determinism of LLM translation vs. the deterministic C-to-Go tool used for Go’s 2015 runtime rewrite is a recurring concern: ten runs produce ten different outputs with no easy correctness guarantee.
Notable Comments
@archargelod: Points to the live claude/phase-a-port branch as the real signal, with 773k+ additions already committed.
@andkenneth: Zig’s “no AI code” policy blocked a Bun upstream contribution, likely accelerating the Rust decision.