Bun v1.3.14 Released: Rust Rewrite Nears Completion, May End Zig Era
Version 1.3.14 of Bun was released on May 13, featuring a massive Rust rewrite that has already passed tests on all major platforms, closed around 200 issues, introduced built‑in image processing, HTTP/3 support, and dramatically reduced binary size, while the migration—driven by AI agents—produced 960 k lines of Rust with 13,044 unsafe blocks, signaling a potential shift away from Zig.
Release Overview
Bun v1.3.14 was released on May 13 as scheduled. The author, Jarred Sumner, announced on X that this could be the last Zig‑based version if the Rust rewrite is merged.
“Bun v1.3.14 releases tomorrow. If we do merge the Rust rewrite, this would be the last version in Zig.”
What Happened in Six Days?
On May 5, a massive commit titled phase-a: draft batch big-1 (12 files) added nearly 28,000 lines of Rust code. The community reacted with over 300 comments on Hacker News.
Initially described as an "experiment" that might be discarded, by May 11 Jarred expressed high confidence, noting the Rust code passed Bun’s full test suite on Linux (glibc & musl), Windows, and macOS for both x64 and arm64, and could close about 200 GitHub issues.
“I have pretty high confidence in it at this point. It passes Bun's test suite on Linux x64 + arm64 glibc + musl, Windows x64 and arm64, and macOS x64 & arm64. It likely closes about 200 github issues. Still refactoring & simplifying.”
The author also claimed no performance regression: benchmarks never showed the Rust version slower than the Zig implementation.
“I have yet to see a benchmark where it is slower than the Zig implementation. It is basically the same codebase. It doesn't use async rust and like the Zig implementation, uses few 3rd party libraries. It's really the same thing just with better tools for us to prevent crashes.”
Key Features in v1.3.14
Bun.Image built‑in image API, no Sharp/libvips dependency; metadata operations up to 70× faster than Sharp, 1080p PNG scaling 1.38× faster, 4K JPEG 1.22‑1.27× faster.
HTTP/3 (QUIC) server via Bun.serve(); static routing achieved 509,135 req/s vs 189,130 req/s for HTTPS/1.1.
fetch now supports HTTP/2 and HTTP/3 with TLS ALPN negotiation; can enable HTTP/3 via { protocol: "http3" } or Alt‑Svc upgrades.
Global virtual store enabled by setting install.globalStore = true in bunfig.toml; warm install time dropped from 841 ms to 115 ms (7.3× faster) for ~1,400 packages on macOS.
fs.watch rewrite consolidates Linux inotify, macOS FSEvents, and kqueue; fixes recursive watch, silent event loss on file deletion, and duplicate FSEvents threads.
--no-orphans flag ensures child processes are killed when the parent exits (uses prctl(PR_SET_PDEATHSIG) on Linux, kqueue on macOS).
LTO across languages inlines 42% of cross‑language functions, boosting HTTP throughput by 3.5% and Bun.escapeHTML by 6.5%.
Binary size reduction : Windows x64 down 17.66 MB, Linux x64 down 8.58 MB, Linux aarch64 down 9.07 MB.
JavaScriptCore received 565 upstream commits, improving Array.shift, JSON.parse, Intl, and adding relaxed SIMD & Memory64 to WebAssembly; SQLite upgraded to 3.53.0.
Core bug fixes: Node.js http/https memory leaks, zlib re‑entrancy, crypto.randomFill buffer overflow, child_process stdout leak, TLS socket lifecycle, fs.cp symlink handle leak.
Rust Rewrite Progress
In six days the Rust side covered roughly 68% of the original Bun codebase, translating about 960 k lines of Zig source.
Rust implementation totals ~681 k lines (slightly fewer than Zig) with a 99.8% test‑pass rate on Linux x64 glibc.
All target platforms (Linux x64/arm64 with glibc & musl, Windows x64/arm64, macOS x64/arm64) passed tests.
Potentially closes ~200 historical GitHub issues.
Contains 13,044 unsafe blocks, indicating the rewrite has not yet fully leveraged Rust’s safety guarantees.
AI‑Assisted Migration
The migration used a docs/PORTING.md guide with ~300 rules for an AI coding agent. The process consisted of two phases:
Phase A : generate draft .rs files next to each .zig file, faithfully reproducing logic without requiring compilation.
Phase B : compile each crate and run tests.
Bun’s team employed Anthropic’s Claude Code infrastructure; the community dubbed the resulting PRs “robobun PR”.
On the evening of May 13, Jarred announced the plan to dogfood the Rust port internally with Claude Code and start writing a blog post.
“The plan for tomorrow: dogfood Bun's Rust port on Claude Code internally and start writing the blog post.”
He also clarified three validation points: bug locations, memory‑usage differences versus Zig, and startup‑time changes. Claude Code will become the first heavy user of the Rust version.
Jarred emphasized the shift in development workflow: the team has not written code manually for months; AI writes the code while humans review.
Claude Code Enhancements
Claude Code introduced a new /goal command to keep agents running until a job is completed, showcasing the synergy between the AI platform and Bun’s migration effort.
Key Takeaways
AI‑assisted large‑scale language migration dramatically reduces engineering time—96 k lines of Rust were produced in six days, a speed unattainable by human effort alone.
Bun’s language switch aims for Rust’s borrow‑checker and deterministic construction/destruction to improve crash safety, not to adopt the broader Rust ecosystem.
The future of Zig is uncertain as a flagship user migrates away; community perception will shape Zig’s ecosystem.
The 13,044 unsafe blocks are a critical metric; reducing this number is essential for the Rust version to truly deliver on safety promises.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
