Jarred tried rewriting Bun in Rust and it passes 99.8% of the existing test suite we're not being ambitious enough
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

Before you orderOffer from Amazon

Get the latest gadgets delivered free with Prime

  • Fast, free delivery on millions of items
  • Prime Video, Amazon Music and more included
  • Member-only deals all year
Start your free Prime trial Free trial for eligible customers · Cancel anytime
As an affiliate, we earn on qualifying purchases.

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.

Amazon

JavaScript runtime 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

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.

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.

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.

COLUMBUS DAY / I

Columbus Day / Indigenous Peoples' Day Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

Arctic Sea Ice Hits Lowest July Extent on Record

Understanding the Arctic’s lowest July sea ice extent reveals urgent climate changes and the unpredictable future of our planet.

Can Someone Please Explain Whether Cloudflare Blackmailed Canonical?

A recent cyberattack on Canonical raised questions about whether Cloudflare facilitated blackmail, as attackers used Cloudflare-bypassing tools while Canonical’s services also rely on Cloudflare.

Building Corvus ISR In Public, Day 1: A WAMI Exploitation Stack, Starting From Synthetic Data

Day 1 of Corvus ISR reveals a synthetic WAMI scene with live detection and tracking, marking the start of a build-in-public effort for wide-area motion imagery.

WSL 2 is getting faster Windows file system access

Microsoft has introduced a new DMA pool allocation method in WSL 2, boosting cross-OS file access performance, especially for file-heavy workflows.