Why This Matters
The discovery of over 13,000 unsafe blocks in Bun's unreleased Rust port highlights the significant challenges in ensuring safety and stability in new language integrations. Addressing these unsafe segments is crucial for delivering a secure and reliable product, which impacts both developer confidence and user trust. This audit underscores the importance of rigorous code review in the transition to Rust for existing projects.
Key Takeaways
- Most unsafe blocks can be removed, improving safety.
- The Rust port has not yet been released, indicating ongoing development.
- Rigorous auditing is essential for secure and stable software migration.
Bun · Rust codebase audit · May 21, 2026 · AI generated
Bun's unreleased Rust port has
13,365 unsafe blocks.
Most can be removed.
Bun's Rust port has not shipped in a released build yet. The Bun you install today still runs the original Zig implementation. This audit is the pre-release pass over the port.
Every unsafe counted with one ripgrep command, then sorted by what removing it takes — command and raw data at the bottom, re-run it yourself. The bar groups all 13,365 by where each could go.