Bun v1.3.13 is a broad stability and compatibility release, with a mix of crash fixes, runtime parity work, and a few bundler and server improvements. The most visible changes are around Node compatibility, WebSocket and fetch behavior, and fixes for bun build --compile on macOS arm64.
What's new
SubtleCrypto.deriveBitsnow works for X25519 keys, using BoringSSL’s X25519 scalar multiplication and matching the expected WebCrypto behavior for full, zero, and shorter output lengths. It also keeps rejecting small-order public keys per RFC 7748. (#29152)- WebSocket clients can now connect over Unix domain sockets with
ws+unix://andwss+unix://. The new support covers plain sockets, TLS over a Unix socket, query/path parsing after the socket path, and defaults theHostheader tolocalhost. (#29203) Bun.servefile responses were consolidated into a sharedFileResponseStream, and static/file-backed responses now supportRangerequests. The new flow is shared byroutes:entries and file bodies returned fromfetchhandlers. (#29202)process.ppidis now a live getter instead of a startup snapshot, so it tracks reparenting the same way Node.js does. That makes orphan-detection patterns likeprocess.ppid === 1work again. (#29171)bun testpicked up new splitting and parallelism options, including--changed,--isolate,--parallel, and--shard=M/N, which make it easier to target subsets of a suite in CI and local runs. (#29262, #29354, #29366)
Breaking changes
- Vendored Rust dependencies are now built with
cargo --locked, so transitive crate versions will no longer silently re-resolve against crates.io. If you rely on updating those dependencies, you now need to update the lockfile intentionally. (#29095) - The mimalloc v3 upgrade changed several Zig-facing allocation bindings and APIs, including removing older
mi_heap_*v1/v2 entry points and splitting the arena vtable paths. A later revert and re-application sequence also landed, so anyone depending on those internal bindings should double-check their usage against the current interfaces. (#29251) bun build --compileon macOS arm64 had a code-signing regression in the previous release. This release sizes__LINKEDITandLC_CODE_SIGNATUREto the signer’s actual output, which restores launchability for compiled binaries. (#29272)
Fixes
- Fixed a memory leak in
AbortSignal.timeout()when listeners were removed before the timer fired. (#28761) - Fixed
process.ppidstaying frozen after the parent process died. (#29171) - Fixed
socket.setTimeout()so incoming data resets the idle timer, matching Node’s inactivity semantics. (#29287) - Fixed
bun buildstripping top-level@layerordering statements from bundled CSS. (#28915) - Fixed re-export clauses with string-literal names so files like
export { "a b c" } from ...transpile correctly. (#29245) - Fixed
bun --cpu-profoutput so.cpuprofilefiles match Node/Deno’s Chrome DevTools format. (#29241) - Fixed
inspectso DOM constructors show their real class name instead of[class Function]. (#29229) - Fixed a MySQL multi-statement hang when an OK terminator carried an info string. (#29271)
- Fixed
path.win32.resolve()crashing on UNC plus drive-relative path combinations. (#29318) - Fixed a Windows
readFilepanic on files larger than 2GB. (#29327) - Fixed a sliced non-regular-file blob overflow when reading from pipes, fifos, or sockets. (#29284)
- Fixed
AbortSignalleaking on the WebSocket upgrade catch-all path. (#29329) - Fixed
ResumableSink.cancel()so aborted fetch bodies do not re-enter after completion. (#29330) - Fixed
bunx @anthropic-ai/claude-codefallback bin linking when the native-dependency redirect target is missing. (#29285) - Fixed several
Bun.servestatic file descriptor leaks on304,HEAD, and bodiless response paths. (#29185) - Fixed
MKADDRESSBOOKbeing dropped by Bun’s HTTP method allowlist. (#28955) - Fixed
os.freemem()on Linux to useMemAvailableinstead ofMemFree. (#29080) - Fixed
tls.connect({ host, port })to keep hostname verification whenservernameis omitted. (#29096) - Fixed
StringDecoder.write()crashing when the decoded result would exceedString::MaxLength. (#29111) - Fixed the bundler’s stale HTML import manifest
etagso rebuilds now reflect changed imported chunks. (#29233) - Fixed
bun build --compileasset inlining for standalone HTML so JS-imported file-loader assets are embedded instead of left as broken paths. (#29300)
Other notable changes
- The WebCore bindings layer was synced with a set of upstream WebKit correctness, safety, and perf fixes. (#29316)
- Bun also picked up additional WebKit upgrades during the release window. (#29161, #29281, #29294)
mimallocwas bumped multiple times during the range, including an upgrade to dev3 and follow-up crasher fixes. (#29251, #29420, #29435)zlibwas replaced withzlib-ng 2.3.3. (#29433)bun build --compilegot additional Nix/Guix and macOS arm64 fixes along the way. (#29292, #29272)--lockedis now passed through to cargo for vendored Rust dependencies. (#29095)
Contributors
@alii @ant-kurt @chrislloyd @cirospaciari @dylan-conway @jarred-sumner @robobun @sosukesuzuki