Skip to content

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

Bun 7 min read Release mediumAdept

Bun v1.0.4

Bun v1.0.4 fixes 62 bugs, adds server.requestIP() for retrieving a request's socket IP (not proxy headers), and supports esbuild-compatible virtual modules in runtime plugins via builder.module(). Bun.serve() now reports manually managed per-request memory to JavaScriptCore's GC, cutting memory by up to ~50% (e.g. Fastify 267 MB to 114 MB after 800k requests). The default fetch() and bun install timeout rises from 30 seconds to 5 minutes between data chunks. The lockfile now stores workspace member versions, and fixes cover getaddrinfo fallback across all results, 3xx fetch hangs, and Node.js compatibility.

Related posts

  • Bun v0.6.9

    Bun mediumAdept

    Bun v0.6.9 focuses on memory reductions: zero-copy string Response bodies in Bun.serve() and Response (60 MB vs Deno's 425 MB and Node's 1414 MB after 1000 responses of a 12 MB string), 50% less memory for cold bun install, and fixed leaks when importing modules. It also fixes non-ASCII filename imports, mockResolvedValue and missing function properties on mocks in bun test, a GC-related crash in the CommonJS require() loader, and a ~192-byte-per-call leak in node:crypto hashing.

  • Bun v0.8.1

    Bun mediumAdept

    Bun v0.8.1 adds unix domain socket support to Bun.serve() via a new `unix` option and fixes a 2.8x request-body throughput regression from v0.8.0 (about 38.6k to 110k req/s). The regression came from microtasks not being drained after reading request bodies, which became unbalanced once v0.8.0 started draining HTTP-server microtasks per request. Other fixes cover reporting native memory for Headers, Blob and fetch() to the garbage collector, runtime inlining of statically failing require() calls that broke napi packages, a 24-byte metadata header leaking into inline sourcemaps under --inspect, stale package.json scripts in the binary lockfile, and node:http proxy URLs.

  • Bun v0.2.0

    Bun mediumAdept

    Bun v0.2.0 adds `bun --hot` for server-side hot reloading that preserves global state and in-flight HTTP requests, `Bun.spawn`/`Bun.spawnSync` for process spawning with flexible stdin sources and ReadableStream output, and streaming request bodies in `Bun.serve`. Memory use for `Bun.serve` drops 2.7x+ after fixing how Request/Response/Blob memory was reported to JavaScriptCore's garbage collector, and an event loop bug fix makes `bun:test` far faster for network tests. Breaking changes: CLI arguments after the script are passed through verbatim, and `process.version` now reports a fake Node.js version for npm compatibility.

  • Bun v1.1.10

    Bun mediumAdept

    Bun v1.1.10 fixes 20 bugs, makes uncached bun install on Windows about 2x faster, and cuts fetch() memory use by up to 2.8x by freeing response bodies sooner. The fetch change pairs JavaScriptCore Strong and Weak references with reference counting in Zig, so the Response and its body are freed once the GC finalizes them, and the HTTP client is told to ignore unread bodies. Other fixes include a Windows hang caused by sockets being made non-blocking only after connect, and a macOS spawn hang where send() with MSG_NOWAIT still blocks on blocking sockets. Smaller items cover sourcemap fixes with --splitting, setDefaultTimeout in bun:test, and an EventEmitter listener-removal bug in node:stream.

  • Bun v1.1.13

    Bun mediumAdept

    Bun v1.1.13 fixes 97 bugs and adds `eval: true` for `node:worker_threads`, `URL.createObjectURL` for spawning TypeScript workers from Blobs, custom failure messages in `expect`, and five new `bun:test` matchers. Several fixes come with explanations of their cause. Concurrent `fetch` failures came from TCP FIN handling, now fixed by setting `SO_LINGER` to 0 to avoid TIME_WAIT socket exhaustion. A `Last-Modified` manifest-cache shortcut in `bun install` broke HTTP keep-alive and has been disabled. Stack-trace offsets were traced to how line and column numbers were read from JavaScriptCore. `crypto.pbkdf2` now uses BoringSSL instead of a JS polyfill, running about 30-40x faster than before and roughly 3x faster than Node.js. Other fixes cover semver parsing, npm manifest string deduplication and WebSocket server crashes.

The quest for software engineering knowledge.

Look:
Layout: