Hacker NewsSaturday · May 16, 2026FREE

Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust"

bunrustmemory-safetyundefined-behavior

A GitHub issue (https://github.com/oven-sh/bun/issues/30719) reports that Bun's Rust codebase fails basic Miri checks, a tool for detecting undefined behavior (UB) in Rust. The issue, opened on May 15, 2026, states that the codebase allows UB in safe Rust, which contradicts Rust's safety guarantees. This could lead to memory corruption, crashes, or security vulnerabilities. The reporter notes that Miri is a standard tool for verifying Rust code, and its failure indicates serious concerns about Bun's memory safety. The issue has garnered attention on Hacker News, with developers discussing the implications for Bun's reliability. Bun, a fast JavaScript runtime written in Zig and Rust, has been undergoing a Rust rewrite, and this finding raises questions about the quality of its Rust code.

// why it matters

Undefined behavior in safe Rust undermines memory safety promises, risking crashes and security flaws.

Sources

Primary · Hacker News
▸ Read original at github.com

Like this? Get the next digest.

Bun Rust rewrite: "codebase fails basic miri checks, allows for UB in safe rust" — aigest.dev