Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Bun 38 min read Release mediumAdept

Bun v1.4.1

Bun v1.4.1 fixes 202 issues and ships runtime, install and bundler improvements. JavaScriptCore now discards JIT code after idle periods, sharply cutting RSS (Next.js SSR 222 MB to 142 MB), and Bun.serve gains HTTP/2 on the same port via ALPN with large throughput gains over node:http2. Buffer read/write methods are JIT-inlined (up to 9x faster), AsyncLocalStorage avoids per-await allocations, Bun.write streams response bodies to disk, and WebSocket gets pause/resume for TCP backpressure. fetch now verifies TLS against the URL hostname rather than the Host header, closing an insecure default. bun build tree-shakes through `export * as` and dynamic import(), shrinking zod bundles by about 79%.

Related posts

  • Bun v1.2.17

    Bun mediumAdept

    Bun v1.2.17 adds ahead-of-time bundling for HTML imports in server code, so `bun build --target=bun` or `--compile` can produce a full-stack build or a single self-contained executable with no runtime bundling. Bun Shell no longer uses the native call stack, which prevents stack overflows in deeply nested scripts. Removing a pointer indirection in Strong references cuts per-timer memory for `setTimeout` and `setImmediate` by 8-15%. Other changes include `columnTypes`/`declaredTypes` in `bun:sqlite`, zstd in `node:zlib`, `--unhandled-rejections` modes, `child_process.fork` `execArgv`, and a JavaScriptCore upgrade bringing JIT string and array optimizations, a zero-copy JSON stringifier and WebAssembly interpreter hardening.

  • Bun v1.3.9

    Bun mediumAdept

    Bun v1.3.9 adds `bun run --parallel` and `--sequential` for running package.json scripts with prefixed output across workspaces, along with Node-compatible HTTP/2 connection upgrades via `net.Server`, `Symbol.dispose` support for test mocks, `NO_PROXY` handling for explicit proxies, `--cpu-prof-interval`, and ESM bytecode in `--compile`. A JavaScriptCore upgrade brings SIMD-accelerated RegExp prefix search on ARM64 and x86_64, JIT compilation of fixed-count parenthesized subpatterns (~3.9x faster), DFG/FTL intrinsics for `startsWith`, `Set/Map#size` (2.2-2.7x) and `trim`, and rope-returning `String#replace`. Fixes include SIGILL crashes on ARMv8.0 CPUs caused by mimalloc LSE atomics, a chunked-encoding request smuggling bug, and keep-alive hangs for proxy-style requests.

  • Bun v0.7.0

    Bun mediumAdept

    Bun v0.7.0 focuses on Node.js compatibility: it can now run `vite dev` (experimentally, via `bun --bun` to override the node shebang), supports Web `Worker` threads with `postMessage` and `structuredClone()`, and implements `AsyncLocalStorage` from `node:async_hooks` as a step toward Next.js support. Other additions include a `--smol` flag that shrinks and slows growth of the JavaScriptCore heap for memory-constrained environments, `bun test --bail`, `Bun.readableStreamToFormData()`, `serialize`/`deserialize` in `bun:jsc`, WebSocket ping/pong with `nodebuffer` as the default binaryType, and many `node:tls` TLSSocket methods. Fixes include a Response memory leak that cut peak memory in a benchmark from 292 MB to 49 MB, base64url hash output matching Node.js, and module resolution ordering for dual CJS/ESM packages like graphql.

  • Bun v1.2.2

    Bun mediumAdept

    Bun v1.2.2 fixes 38 bugs and cuts idle JavaScript memory usage by 10–30% (28% for Next.js, 11% for Elysia). The fix integrates JavaScriptCore's garbage collector timers into Bun's event loop, and on Linux GC thread suspension moves from SIGUSR1 to SIGPWR so it no longer conflicts with applications that use SIGUSR1. The release also fixes a vite build regression caused by an event-loop bug in async file writes, and improves reliability of Bun.SQL prepared statements, S3 multipart uploads and the CSS parser. Node.js compatibility additions include fs.glob, NODE_PATH resolution, and fixes for fs.Dir, createRequire on virtual paths, pnpm, and DuckDB native modules.

  • Bun v0.3.0

    Bun mediumAdept

    Bun v0.3.0 focuses on stability and Node.js/Web API compatibility, cutting memory use 3-5x under load by scheduling garbage collection in coordination with the event loop and speeding up TextEncoder.encodeInto() 3x via simdutf. New Node.js APIs include node:child_process, process stdio streams, Error.captureStackTrace and fs streams, alongside automatic npm package installs on import when no node_modules exists. Other additions are a native Next.js-style FileSystemRouter, console as an AsyncIterable for reading stdin, threadsafe bun:ffi callbacks, new bun:test matchers with a faster toEqual(), and a long list of fetch, spawn and crash fixes.

The quest for software engineering knowledge.

Look:
Layout: