TL;DR

Jarred has rewritten Bun, a JavaScript runtime, in Rust, and the new implementation passes 99.8% of the existing test suite. This marks a major milestone in the project’s development.

Jarred has completed a rewrite of Bun, a JavaScript runtime, in Rust, achieving a 99.8% pass rate on the existing test suite, according to a recent post on X (Twitter). This development highlights a significant step forward in the project’s progress and potential performance improvements.

The effort to rewrite Bun in Rust was publicly shared by Jarred on X, where he reported that the new implementation passes 99.8% of the standard test suite used for Bun. This high pass rate indicates that the Rust version is nearly fully compatible with the original JavaScript runtime, a notable achievement given the complexity of such systems.

The original Bun runtime is designed to optimize JavaScript and TypeScript performance, and rewriting it in Rust aims to enhance speed, safety, and stability. While the project has not yet achieved 100% test pass, the 99.8% figure suggests that most core functionalities are operational, with some edge cases still under review. The tests cover a broad spectrum of runtime behaviors, including module loading, execution, and system calls, which are critical for real-world application compatibility.

Why It Matters

This milestone is significant because it demonstrates that a high-performance JavaScript runtime can be effectively reimplemented in Rust, a language known for safety and speed. If the project continues to improve and reach full compatibility, it could influence future JavaScript runtime development, potentially leading to faster, more secure environments for web and server-side applications. For the developer community, this also signals a shift toward exploring alternative implementations beyond traditional engines.

Introduction to JavaScript Runtime Architecture: Event Loops Module Loaders and Native Performance Optimization

Introduction to JavaScript Runtime Architecture: Event Loops Module Loaders and Native Performance Optimization

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Bun is a relatively new JavaScript runtime that aims to provide faster startup and execution times compared to existing engines like Node.js and Deno. The project has gained attention for its performance claims and modern architecture. Rewriting Bun in Rust is part of broader efforts to improve runtime efficiency and safety, with Jarred’s work representing a significant technical challenge. Prior to this, Bun was primarily implemented in JavaScript and C++, and this rewrite attempts to leverage Rust’s advantages for systems programming.

“We’re not being ambitious enough”

— Jarred

“Passing 99.8% of the tests is a major milestone, but some edge cases still need addressing.”

— Unnamed source familiar with the project

The Rust Programming Language, 3rd Edition

The Rust Programming Language, 3rd Edition

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how the remaining 0.2% of tests will be passed or what specific functionalities are still failing. The timeline for achieving complete compatibility and the final performance benchmarks are still uncertain. Additionally, the impact of this rewrite on Bun’s adoption and real-world performance remains to be seen as further testing and optimization continue.

Introduction to JavaScript Runtime Architecture: Event Loops Module Loaders and Native Performance Optimization

Introduction to JavaScript Runtime Architecture: Event Loops Module Loaders and Native Performance Optimization

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Next steps include addressing the remaining test failures, optimizing performance, and conducting real-world testing to validate stability. The project team may also release updated versions and seek community feedback to refine the implementation. Monitoring progress toward full test suite pass rate and performance benchmarks will be key in the coming months.

Odoo 19 Development Cookbook: Build production-grade ERP applications with OWL, REST APIs, and scalable server-side logic

Odoo 19 Development Cookbook: Build production-grade ERP applications with OWL, REST APIs, and scalable server-side logic

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What is Bun, and why is rewriting it in Rust important?

Bun is a JavaScript runtime designed for high performance, and rewriting it in Rust aims to improve speed, safety, and stability, potentially setting new standards for JavaScript execution environments.

What does passing 99.8% of tests mean for the project?

It indicates that the Rust version is nearly fully compatible with the original, with most functionalities working correctly, though some edge cases remain unresolved.

When might the Rust version of Bun be ready for production use?

It is too early to determine a timeline; further testing, optimization, and bug fixing are needed before considering production deployment.

How does this development affect the broader JavaScript ecosystem?

If successful, the Rust rewrite could influence future runtime designs, encouraging more systems-level improvements and alternative implementations for JavaScript environments.

You May Also Like

Musk’s Colossus 1 AI supercomputer’s inefficient mixed-architecture design couldn’t be used to train Grok, so Anthropic’s using it for inference instead — Musk readies unified Blackwell-only Colossus 2 for frontier training and potential IPO

SpaceX’s Colossus 1 supercomputer, with mixed GPU architecture, is being leased to Anthropic to address its compute bottlenecks, raising questions about efficiency.

Raw-feed licensing. The contract that doesn’t exist yet.

A formal contract for raw-feed licensing has not yet been established, raising questions about future licensing frameworks and industry implications.

Maker packs an opinionated, googly-eyed AI chatbot into a mobile suitcase, powered by an Nvidia Jetson — entirely local machine entity runs Gemma 4 E4B and can respond in 200ms

A Redditor built Sparky, an opinionated, fully offline AI chatbot in a suitcase using Jetson Orin hardware, sensors, and expressive visuals.

Cursor Introduces Composer 2.5

Cursor announced the release of Composer 2.5, featuring improved intelligence, behavior, and training methods, marking a significant upgrade over Composer 2.