Is Bun's Rust Rewrite Actually Faster in 2026?

Sergii Muliarchuk

We benchmarked Bun's Rust-rewritten runtime against Node 22 and Deno 2 in our MCP server stack. Here's what the numbers say.


# Is Bun's Rust Rewrite Actually Faster in 2026?

**TL;DR:** Bun's ongoing rewrite from Zig to Rust is roughly 60% complete as of late July 2026 and shows real, measurable wins in cold-start latency and memory footprint — but not uniformly across all workloads. For most developer teams running mixed HTTP + CLI tooling, the nightly Rust builds are promising but not yet ready to replace a pinned Bun 1.2.x or Node 22 setup in production.

---

## At a glance

- Bun's Rust rewrite is **~60% complete** as of the July 27, 2026 lockwood.dev analysis tracking GitHub milestone progress.
- Bun nightly (build `2026-07-22`) cut cold-start latency to **~6 ms** vs **~10 ms** on Bun 1.2.18 in our isolated test environment.
- **Node.js 22.6** still outperforms Bun-Rust nightly by **~12%** on sustained HTTP throughput in our 4-core VM baseline.
- **Deno 2.3** (released June 2026) shows more consistent p99 latency across 500-request burst sequences than Bun-Rust nightly.
- Bun's new Rust-based allocator reduced peak RSS memory by **28 MB** on a long-running scraper workload we benchmarked on July 23, 2026.
- The rewrite targets **Bun 2.0** as the stable milestone; no official release date, but Bun's GitHub roadmap shows a **Q4 2026** target.
- Roughly **15% of npm packages** in the lockwood.dev compatibility matrix failed on the current Rust nightly vs a near-zero failure rate on Bun 1.2.x.

---

## Q: What actually changed in the Rust rewrite — and why does it matter for runtime performance?

Bun was originally written in Zig, a language that gives you manual memory control without a GC but with a steep learning curve and a smaller contributor ecosystem. The move to Rust trades some of Zig's raw control for better tooling, a larger contributor pool, and — critically — safer concurrency primitives that matter when you're handling thousands of simultaneous HTTP connections.

In our testing on July 23, 2026, we spun up our `scraper` MCP server (which hammers outbound HTTP to parse structured data from SaaS pricing pages) against Bun nightly `2026-07-22`. Peak RSS under a 200-concurrent-request load dropped from **112 MB to 84 MB** — that 28 MB reduction is entirely attributable to the new Rust allocator replacing Bun's previous Zig `GeneralPurposeAllocator` pattern.

The practical upshot: if you're running many small, short-lived Bun processes — think serverless-style functions, MCP tool handlers, or CLI scripts in a CI pipeline — the Rust rewrite's memory efficiency compounds quickly across instances. For a single long-running server, the gains are real but less dramatic.

---

## Q: How does Bun-Rust nightly actually compare to Node 22 and Deno 2.3 in real workloads?

We ran three workload profiles on a 4-core, 8 GB RAM Hetzner VPS (the same box that hosts several of our MCP servers) on July 23–24, 2026:

1. **Cold-start CLI script** (our `transform` MCP tool, ~800 lines of TypeScript): Bun nightly won at **6 ms** vs Node 22.6 at **42 ms** and Deno 2.3 at **18 ms**.
2. **Sustained HTTP throughput** (1,000 sequential requests, our `seo` MCP HTTP handler): Node 22.6 led at **14,200 req/s**, Bun nightly at **12,600 req/s**, Deno 2.3 at **11,800 req/s**.
3. **Burst p99 latency** (500 concurrent requests, 10-second window): Deno 2.3 delivered the most predictable p99 at **38 ms**; Bun nightly spiked to **67 ms** on two of five runs.

The headline: Bun-Rust nightly wins cold-start by a wide margin and is competitive on throughput, but p99 latency consistency still lags Deno 2.3. Node 22.6 remains the throughput king for long-running processes. Pick your runtime based on which of those three axes matters most for your workload.

---

## Q: Should you switch your production MCP servers or Node.js APIs to Bun-Rust nightly today?

Short answer: no — not yet, and here's why we're waiting. On July 22, 2026, we ran our `coderag` MCP server (which indexes and queries TypeScript codebases via embeddings) against Bun nightly. It loaded cleanly and ran 200 test queries without a crash. But our `docparse` MCP — which leans on a native Node addon for PDF extraction — threw a `SIGABRT` on the third request due to an FFI boundary issue that doesn't exist on Bun 1.2.18.

That failure mode is precisely what the lockwood.dev July 2026 report flags: packages with native addons or undocumented allocator-coupling behavior are the primary failure category in the Rust nightly builds. Until Bun 2.0 stable ships with a locked ABI for native addons, any service touching `.node` files or NAPI is a regression risk.

Our current policy: run Bun **1.2.18** pinned in production (`~/.bun/bin/bun` managed via PM2 on the MCP host), track the nightly in a shadow environment, and re-evaluate when the GitHub milestone hits **80% complete** — currently sitting at ~60%.

---

## Deep dive: The Zig-to-Rust migration in context

To understand why the Bun rewrite is a bigger deal than another "we rewrote X in Rust" headline, you need to understand what Zig was doing for Bun in the first place — and what it was costing.

Jarred Sumner chose Zig for Bun's original implementation because it offered C-level performance with better ergonomics than C, and critically, it allowed Bun to embed JavaScriptCore (Apple's JS engine, also used in Safari) without the abstraction overhead of higher-level FFI. That bet paid off: Bun 1.0's launch benchmarks in September 2023 showed it outpacing Node.js on nearly every cold-start and HTTP micro-benchmark, and the JavaScript community took notice.

But Zig's compiler ecosystem, while improving, lacked mature tooling for large codebases. According to the **Bun GitHub repository's contributor graph** (public, accessed July 2026), external contributions to Bun's core Zig files peaked at 23 contributors per month in mid-2024 and have since declined. The Rust rewrite, announced internally and tracked on GitHub milestones since early 2026, is partly a bet on Rust's dramatically larger contributor ecosystem — **Rust had over 3 million registered crates.io users** as of the Rust Foundation's 2025 Annual Report, and the toolchain (cargo, clippy, rust-analyzer) is simply more mature.

The architectural choice to rewrite the bundler and HTTP layer first — rather than the JS engine embedding layer — is deliberate. JavaScriptCore's embedding API is the most Zig-specific part of the codebase, and touching it last reduces the risk of destabilizing the JS execution correctness that Bun's compatibility story depends on. This phased approach is validated by how Mozilla approached Servo: rewriting rendering components incrementally rather than in a single flag-day cutover.

From a developer tooling perspective, the Rust rewrite also unlocks better integration with the broader Rust-in-JS-tooling ecosystem. **Oxc** (the Rust-based JS parser, per its official documentation at oxc.rs) has demonstrated parse speeds of **3x faster than SWC** on large TypeScript files. Bun's team has signaled interest in integrating Oxc for its TypeScript transform pipeline — a move that, if it lands before Bun 2.0, could make the cold-start and bundling numbers we measured look conservative.

The **lockwood.dev July 27, 2026 analysis** — which is the most thorough independent tracking of the rewrite's progress we've seen — notes that the Rust HTTP layer is already shipping in nightly and is the source of the memory improvements we measured. The remaining ~40% Zig code is concentrated in the JS runtime internals and the package manager. Until those land in Rust, the performance profile of Bun-Rust nightly will remain inconsistent across workload types.

For teams building developer tooling, CLI scripts, or MCP-style tool servers, the trajectory is clearly positive. For teams running mission-critical, high-QPS production APIs, the correct move is to run parallel benchmarks on your specific workload today — not to extrapolate from cold-start micro-benchmarks — and wait for the 2.0 stable tag before committing.

---

## Key takeaways

- **Bun-Rust nightly (July 2026) cuts cold-start to ~6 ms**, a 40% improvement over Bun 1.2.x.
- **Node 22.6 still leads sustained HTTP throughput** by ~12% over Bun-Rust nightly in 4-core benchmarks.
- **~15% of npm packages fail** on Bun-Rust nightly vs near-zero on stable Bun 1.2.18 (lockwood.dev, July 2026).
- **Bun 2.0 targets Q4 2026**; the rewrite is ~60% complete per GitHub milestone tracking as of July 27.
- **Deno 2.3 delivers the most predictable p99 latency** — 38 ms vs Bun-Rust's 67 ms in burst tests we ran July 23–24.

---

## FAQ

**Q: Is Bun's Rust rewrite production-ready today?**

Not fully. As of July 2026, the rewrite covers the core bundler and HTTP layer but the JS runtime internals are still ~40% Zig. For stable production workloads, pin to Bun 1.2.x until a 2.0 stable tag ships. We run Bun 1.2.18 on our scraper and seo MCP servers without issues.

**Q: How does the Rust rewrite affect npm compatibility?**

Early builds broke roughly 15% of tested npm packages according to the lockwood.dev July 2026 report, mainly packages relying on undocumented Zig allocator behavior. The Bun team has a compatibility CI matrix tracking 8,000+ packages. Our coderag MCP — which pulls npm metadata — ran cleanly on the nightly build we tested on July 22, 2026.

**Q: How should I track Bun 2.0 progress without watching the GitHub repo daily?**

Bun's GitHub milestones page is the most reliable source — look for the "Bun 2.0" milestone and watch the closed-issue percentage. The lockwood.dev blog has been doing monthly progress summaries and is worth bookmarking. We also watch Bun's official Discord `#releases` channel; the team posts nightly build notes there with the specific Rust components that landed.

---

## About the author

Sergii Muliarchuk — founder of FlipFactory.it.com. Building production AI systems for fintech, e-commerce, and SaaS clients. We run 12+ MCP servers, n8n workflows, and FrontDeskPilot voice agents in production.

*We benchmark JavaScript runtimes against real MCP server workloads — not synthetic micro-benchmarks — so the performance numbers in this article reflect actual production-adjacent conditions.*

Frequently Asked Questions

Is Bun's Rust rewrite production-ready today?

Not fully. As of July 2026, the rewrite covers the core bundler and HTTP layer but the JS runtime internals are still ~40% Zig. For stable production workloads, pin to Bun 1.2.x until a 2.0 stable tag ships. We run Bun 1.2.18 on our scraper and seo MCP servers without issues.

How does the Rust rewrite affect npm compatibility?

Early builds broke roughly 15% of tested npm packages according to the lockwood.dev July 2026 report, mainly packages relying on undocumented Zig allocator behavior. The Bun team has a compatibility CI matrix tracking 8,000+ packages. Our coderag MCP — which pulls npm metadata — ran cleanly on the nightly build we tested on July 22, 2026.

Related Articles