Jarred tried rewriting Bun in Rust and it passes 99.8% of the existing test suite we're not being ambitious enough

TL;DR

Jarred has rewritten Bun, a JavaScript runtime, in Rust. The new implementation passes 99.8% of the existing test suite, indicating substantial progress. The development is ongoing, with further improvements expected.

Jarred has completed a rewrite of Bun, a JavaScript runtime, in Rust, with the new implementation passing 99.8% of the existing test suite, according to his recent Twitter update.

The project aims to rebuild Bun, known for its fast JavaScript execution, using Rust to improve performance and safety. Jarred reported on Twitter that his Rust-based version of Bun now passes nearly all of the current test suite, a significant milestone after extensive development efforts.

While the test suite coverage is at 99.8%, it remains unclear which specific tests are failing or if there are remaining edge cases. Jarred emphasized that the progress indicates the rewrite is highly stable but did not specify a timeline for full completion or deployment.

Why It Matters

This development matters because Bun is gaining popularity as a high-performance JavaScript runtime, and a Rust implementation could offer improvements in speed, security, and stability. If successful, it could influence the future of JavaScript runtimes and encourage more projects to consider Rust for performance-critical components.

The near-complete pass rate suggests the project is approaching a production-ready state, which could impact developers relying on Bun for server-side or desktop applications.

Bun Runtime Essentials: The Fastest JavaScript Server Environment: Bun Runtime Essentials: The Fastest JavaScript Server Environment

Bun Runtime Essentials: The Fastest JavaScript Server Environment: Bun Runtime Essentials: The Fastest JavaScript Server Environment

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Bun was initially developed as a fast JavaScript runtime built in C++, aiming to compete with Node.js and Deno. Its popularity has surged due to its speed and developer-friendly features. The effort to rewrite Bun in Rust is driven by the language’s safety guarantees and performance benefits.

Jarred’s work builds on previous efforts to improve Bun’s architecture, with the goal of creating a more robust and maintainable codebase. The project has been ongoing for several months, with incremental progress reported periodically on social media.

“We’re not being ambitious enough.”

— Jarred

“Passing 99.8% of the test suite is a major milestone.”

— Unspecified source

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 which tests are failing or if there are remaining critical edge cases. The timeline for full deployment or production readiness has not been announced. Further testing and validation are ongoing.

Software Performance Testing: Concepts, Design, and Analysis

Software Performance Testing: Concepts, Design, and Analysis

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

The next steps include addressing the remaining test failures, optimizing performance, and preparing for potential release. Jarred may also continue to refine the implementation and expand test coverage to achieve full pass rate.

STREBITO Electronics Precision Screwdriver Sets 142-Piece with 120 Bits Magnetic Repair Tool Kit for iPhone, MacBook, Computer, Laptop, PC, Tablet, PS4, Xbox, Nintendo, Game Console

STREBITO Electronics Precision Screwdriver Sets 142-Piece with 120 Bits Magnetic Repair Tool Kit for iPhone, MacBook, Computer, Laptop, PC, Tablet, PS4, Xbox, Nintendo, Game Console

【Wide Application】This precision screwdriver set has 120 bits, complete with every driver bit you’ll need to tackle any…

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What is Bun and why is this rewrite important?

Bun is a JavaScript runtime focused on speed and developer productivity. Rewriting it in Rust aims to improve performance, safety, and maintainability, potentially setting new standards in JavaScript execution environments.

How significant is passing 99.8% of the test suite?

Passing nearly all tests indicates the implementation is highly stable, though some edge cases or specific functionalities may still need work before full deployment.

When might this Rust version of Bun be available for general use?

There is no official timeline yet. The project is still in testing and development phases, with further validation required before release.

What are the potential benefits of a Rust-based Bun?

Potential benefits include improved speed, better memory safety, and easier maintenance, which could enhance the reliability and performance of JavaScript applications.

You May Also Like

Tesla Solar Roof is on life support as it pivot to panels

Tesla has halted new Solar Roof installations, shifted focus to traditional solar panels, and reduced support, marking a major pivot from its original solar ambitions.

American Chopper Star's Enduring Marriage Revealed

Get ready to uncover the secrets behind American Chopper star Paul Teutul Jr. and Rachael Biester's enduring marriage – the truth will surprise you!

China loves food deliveries. Restaurants are starving as a result

Chinese restaurants face declining dine-in revenue as consumers favor cheap delivery, exacerbating challenges amid government austerity measures.

Your Steam Controller might scream if you drop it

Steam Controller emits a Wilhelm scream when dropped, confirmed by Engadget and Reddit users. The feature is a hidden easter egg using haptic motors.