惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

WordPress大学
WordPress大学
A
About on SuperTechFans
量子位
B
Blog RSS Feed
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
博客园_首页
MongoDB | Blog
MongoDB | Blog
小众软件
小众软件
Blog — PlanetScale
Blog — PlanetScale
Microsoft Azure Blog
Microsoft Azure Blog
V
V2EX
Google DeepMind News
Google DeepMind News
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
G
Google Developers Blog
U
Unit 42
D
DataBreaches.Net
博客园 - Franky
D
Docker
宝玉的分享
宝玉的分享
Y
Y Combinator Blog
月光博客
月光博客
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
Hugging Face - Blog
Hugging Face - Blog

DEV Community

Authentication Security Deep Dive: From Brute Force to Salted Hashing (With Java Examples) Why AI Systems Don’t Fail — They Drift Spilling beans for how i learn for exam😁"Reinforcement Learning Cheat Sheet" I Replaced Chrome with Safari for AI Browser Automation. Here's What Broke (and What Finally Worked) How Python Borrows Other People's Work The $40 Architecture: Processing 1 Billion API Requests with 99.99% Uptime Vibe Coding: A Workflow Guide (From Zero to SaaS) Most webhook security guides protect the wrong side. The scary part is delivery. Headless CMS for TanStack Start: Build a Blog with Cosmic EU Age Verification App "Hacked in 2 Minutes" — What Actually Happened Comfy Cloud’s delete function does not actually remove files Running AI Models on GPU Cloud Servers: A Beginner Guide Event-driven media intelligence with AWS Step Functions and Bedrock I scored 500 AI prompts across 8 quality dimensions — here's what broke How to Call Google Gemini API from Next.js (Free Tier, No Backend Needed) The Portal Protocol: Reclaiming Human Connection in the Age of AI How to Fix Your Team's Scattered Knowledge Problem With a Self-Hosted Forum Intro to tc Cloud Functors: A Graph-First Mental Model for the Modern Cloud Designing Multi-Tenant Backends With Both Ownership and Team Access I Built a Neumorphic CSS Library with 77+ Components — Here's What I Learned PostgreSQL Performance Optimization: Why Connection Pooling Is Critical at Scale Cómo construí un SaaS multi-rubro para gestionar expensas en Argentina con FastAPI + Vue 3 🚀 I Built an Ethical Hacking Scanner Tool – Open Source Project I Replaced /usage and /context in Claude Code With a Single Statusline A Pythonic Way to Handle Emails (IMAP/SMTP) with Auto-Discovery and AI-Ready Design I Collected 8.9 Million Polymarket Price Points — Here's What I Found About How Markets Really Move EcoTrack AI — Carbon Footprint Tracker & Dashboard Everyone's Using AI. No One Agrees How. 5 self-hosted ebook managers worth trying in 2026 Building Your First AI Agent with LangChain: From Chatbot to Autonomous Assistant
Bun shipped a million lines of AI-generated unsafe code. ...
Aditya Agarwal · 2026-06-22 · via DEV Community

There were thirteen thousand unsafe blocks. This text was generated by AI. It was sent to a JavaScript runtime that millions of developers use. Take a moment to think about that.

Bun's massive Rust rewrite and its experimental multithreading PR have both landed recently, and the discourse around them has been… something. The headline achievements are real: Bun rewrote its core in Rust and is experimenting with true multithreading. But the way it got there should make every engineer uncomfortable.

What Actually Happened

The majority of the Rust rewrite was written by Claude AI. This is not gossip – it has been openly stated by the Bun team. The rewrite added more than 13,000 unsafe blocks to the codebase. And it was released without a concurrent garbage collector.

For the non-systems folks: "unsafe" in this context means code that bypasses memory safety guarantees. One unsafe block may not be problematic. Thirteen thousand of them in AI-generated code is a different conversation entirely.

The Velocity Trap 🏎️

I get the appeal. I really do. AI can generate enormous amounts of code fast. When you're a small team competing against Node.js and Deno, speed feels like survival.

Moving quickly is fine, but being careless is not. Each unsafe code block is like a contract signed by the developer stating: "I promise that this memory access is valid." The question is, if the developer is an LLM, who is signing that contract?

→ AI-generated code isn't inherently bad.
→ AI-generated unsafe code at scale, in a runtime, without a concurrent GC, is a different beast.
→ The risk isn't theoretical — it's memory corruption, data races, and crashes in production apps that chose Bun for speed.

The absence of a concurrent garbage collector implies that in real multithreaded workloads, memory management is a minefield. It is not a missing feature. It is a missing foundation.

Trust Is the Product

I believe that many people do not fully understand what runtimes are. A runtime is not like a library that you can replace easily. It is the foundation on which your entire application is built. Therefore, when you choose Node, Deno, or Bun, you are essentially making a decision based on trust.

Certain developers have begun shifting back to Node.js due to concerns around stability. That's not FUD — that's the natural consequence of shipping infrastructure that feels experimental at the layer where experiments hurt the most.

I've experienced something similar but in a less spectacular form. A team delivers quickly, receives recognition, and then for the next couple of years has to make up for the lack of trust. It wasn't that the code was wrong. But the difference in confidence between "it works on my machine" and "it won't destroy your production data" is staggering. 😅

The Real Question Isn't About AI

I may not be anti-AI in codebases, I use AI tools every day. But I treat AI-generated code the same way I treat code from a junior engineer - it needs review proportional to the blast radius.

The explosion range of multithreading programming inside a JavaScript runtime is one of the highest. Thirteen thousand unsafe blocks required thirteen thousand good reasons to have them. Not thirteen thousand rubber stamps.

→ High-velocity AI generation demands higher-velocity review, not lower.
→ The number of unsafe blocks isn't the scandal. The apparent lack of proportional scrutiny is.

This is not to blame Bun's team or their aspirations. Jarred and the team have done a truly amazing job with the technology. However, being ambitious without being similarly careful in your systems code is not being bold. It's a liability bomb that has a delayed fuse. 💣

Where This Leaves Us

Bun still has the potential to become a great runtime. However, sending out such a massive amount of AI-generated unsafe code without a concurrent GC can establish a dangerous standard for those who are either building on top of it or working on building anything using AI-generated systems code.

The conclusion to draw isn't "let's not use AI for that." It is that the level of review must be proportional to the blast radius, particularly when the person who wrote the code is incapable of reasoning about the cost of being wrong.

Would you run 13,000 AI-generated unsafe blocks in production under your app? What's your threshold for trusting AI-written infrastructure code?