Bun's Rust Rewrite Hits 99.8% Test Pass Rate on Linux x64
#Rust

Bun's Rust Rewrite Hits 99.8% Test Pass Rate on Linux x64

Startups Reporter
1 min read

Jarred Sumner announces that nearly all of Bun's existing test suite now passes on Linux x64 glibc in the ongoing Rust rewrite, marking a significant milestone for the JavaScript runtime's transition from Zig.

Jarred Sumner, creator of the Bun JavaScript runtime, announced on X that 99.8% of Bun's pre-existing test suite now passes on Linux x64 glibc in the Rust rewrite. The milestone represents substantial progress in what has been one of the most ambitious rewrites in the JavaScript ecosystem.

Bun, which launched as a fast all-in-one JavaScript runtime, bundler, and package manager, was originally written in Zig. The decision to rewrite in Rust has been underway for some time, with Sumner citing maintainability and contributor accessibility as key motivations. Rust's stronger type system and memory safety guarantees offer different trade-offs than Zig's low-level control, and the rewrite aims to leverage Rust's ecosystem while preserving Bun's performance characteristics.

The 99.8% pass rate is notable because it indicates the rewrite is approaching feature parity with the existing implementation. The remaining 0.2% of tests likely cover edge cases, platform-specific behaviors, or features that haven't yet been ported. Achieving this level of compatibility on Linux x64 glibc, the most common server environment, suggests the project is moving toward a usable state.

The Rust rewrite carries implications beyond just Bun's internal architecture. A Rust-based JavaScript runtime could attract different contributors than a Zig-based one, potentially accelerating ecosystem growth. Rust's tooling, debugging capabilities, and existing integrations in the broader systems programming landscape may also benefit long-term maintenance.

Sumner has been documenting the rewrite progress incrementally, and this milestone suggests the project is entering a late stage of the transition. The next phases will likely involve macOS and Windows compatibility, along with broader testing and optimization before a stable release.

For developers watching Bun's evolution, the test pass rate signals that a production-ready Rust-based version is becoming tangible. The runtime's original promise of fast startup times and integrated tooling remains the target, now with a different foundation underneath.

Comments

Loading comments...