Anthropic bakes memory fixes into Bun 1.1.13 as developers complain of leaks

Bun is fast as a toolkit but can leak memory in production, causing slowdowns and crashes A new version of the Bun JavaScript runtime and toolkit is out with enhanced testing support and improved memory management.

Anthropic bakes memory fixes into Bun 1.1.13 as developers complain of leaks
Anthropic bakes memory fixes into Bun 1.1.13 as developers complain of leaks Photo: The Register

Bun is fast as a toolkit but can leak memory in production, causing slowdowns and crashes
A new version of the Bun JavaScript runtime and toolkit is out with enhanced testing support and improved memory management.

The latter is a critical issue to devs and follows complaints of memory leaks causing problems in production.

Bun, acquired by Anthropic in December 2025, is both a bundler for compiling TypeScript or JavaScript applications for the browser, and a runtime for server-side code.

It competes with the long-established Node.js, latest version 25.9, and Deno, developed by Node.js creator Ryan Dahl.

New features in 1.1.13 include improvements to the test runner, which is intended to be compatible with the popular Jest testing framework.

This version introduces an isolate flag, which runs each test in a fresh environment, and a parallel flag, which runs concurrent tests across a user-defined number of processes.

It is also now possible to split tests across multiple test runners with the shard flag, matching Jest's syntax.

Compression in Bun now uses zlib-ng (next generation), an optimized fork of zlib, and yielding up to five times faster compression without any other code changes.

But perhaps most important is the attention to memory issues in this release.

Bun inventor Jared Sumner claims that the runtime uses 5 percent less memory, and that an upgraded memory allocator along with an implementation of Libpas scavenger returns unused memory to the operating system faster.

According to Sumner, these two changes "reduce baseline memory usage and fix a class of hangs and crashes in long-running processes."
This is significant, as excessive memory use in Bun is a common complaint.

"Bun is not stable enough for production nor faster than Node in production," said one user on Reddit, for which he blamed memory leaks.

Developers working with Bun as a toolkit may not notice this, but using it as a production runtime means "long running workloads amplifying problems that short benchmarks never reveal."
Jay V, founder of OpenCode, whose product is an open source AI agent, said on X that "we are moving to Node and Electron, away from Bun and Tauri." Tauri is a Rust framework for cross-platform desktop applications.

"Bun is not a good fit for apps with a large user base, you should just stick to Node," he added, citing memory issues, crashes, and "terrible Windows support."
That said, Bun is well liked for its speed and rich feature set, and not every deployment is problematic.

"I've been very satisfied since I switched to Bun.

It's fast and has a great standard library," said one user.

There are enough complaints though to suggest caution when using Bun in long-running processes, with reports like this one where GC (garbage collection) seems to be failing with certain functions, ending up with an OOM (out of memory) error.

Bun development has proceeded at high speed since its first production release in September 2023.

Some users would prefer a slower pace of new features, in return for more focus on stability.

®

Source: This article was originally published by The Register

Read Full Original Article →

Share this article

Comments (0)

No comments yet. Be the first to comment!

Leave a Comment

Maximum 2000 characters