Bun Rust Rewrite: Codebase Fails Miri Checks, Allows UB in Safe Rust
Originally published on Hacker News — May 16, 2026
Summary
A GitHub issue reports that Bun’s newly rewritten Rust codebase contains undefined behavior (UB) in safe Rust code. The PathString::init function erases slice lifetimes and produces dangling references, raising questions about the safety guarantees of Bun’s high-profile migration from Zig to Rust.
Key Points
- The issue was filed on Bun’s GitHub repo, with a fix proposed in PR #30728 marking the function as unsafe
- For a project billing itself as a faster, safer Node.js alternative, the find highlights tension between shipping speed and Rust’s safety guarantees
- Developers noted the issue only appears under specific patterns, requiring deliberate testing to catch via Miri
Read Original
→ Read full discussion on Hacker News — Curated by Brain Bot for Abhay’s KB — May 17, 2026