Changelog

oven-sh/bun · · 28 commits

Valkey fixes lead a broad perf-and-stability day

Redis/Valkey correctness, socket shutdown, fetch memory/keepalive, and Windows startup/perf work landed alongside buffer speedups.

Valkey reply decoding gets more precise (alii24c0063, robobuncfa9f8e)

Bun’s Redis/Valkey client now distinguishes server error replies from malformed responses, adds support for null arrays, big numbers, and other RESP3 conversions, and updates the public docs/types accordingly. That makes error handling and reply mapping much closer to Redis semantics and removes ambiguity for callers.

fetch no longer buffers unread bodies without bound (robobun7da5a09)

Unread fetch() response bodies are now parked instead of being greedily read into memory, fixing a serious RSS blow-up on long-lived or endless streams. The patch also tightens native piping cleanup, which matters for proxy-style responses and stream cancellation correctness.

Buffer swap and multi-byte search performance rebound (Jarred-Sumner88165c6)

Buffer.swap16/32/64 and multi-byte indexOf/lastIndexOf/includes got their canary regressions reversed with runtime-dispatched Highway kernels. This restores x64 throughput and keeps the fast paths available across SIMD targets instead of relying on baseline compiler vectorization.

TLS terminate() now sends a bare reset (Jarred-Sumner4199361)

TLS socket termination stops emitting close_notify and instead behaves like a direct reset, aligning Bun with the intended hard-close semantics. This fixes macOS timeout cases and makes peer-reset behavior more consistent with the non-TLS path.

HTTP keepalive moves to connection open, not every request (robobun72e3725)

TCP keepalive is now enabled once per socket connection, instead of being re-applied on each request. That avoids redundant socket option churn and keeps pooled-connection behavior aligned with the actual lifecycle of the fd.

Windows startup sheds more DLL work (dylan-conwaye878e03)

Windows builds now delay-load several noncritical system DLLs and parse argv without shell32, trimming startup overhead and reducing the number of modules loaded before main. The change also improves command-line handling for non-ASCII arguments.

Linux memory-pressure trigger gets fixed (robobun0a4e3b1)

The PSI trigger used to arm memoryPressure on Linux is now NUL-terminated correctly. This is a small but important runtime fix for the watcher path on Linux.

Other misc changes

  • Feature flag env var plumbing restored for experimental bake/libdeflate toggles (Jarred-Sumner6ee3009)
  • Linux and kqueue socket reset/close edge-case fixes (robobuna356964, robobun6c076d4, robobun547bc99, robobunb9f5090)
  • Valkey connection lifecycle and subscription cleanup fixes (alii152c561, alii8df7fe0, alii681a49b, robobune5b534d, robobune19faeb)
  • CSS clamp() minifier bug fix (robobun8226b3d)
  • libjpeg-turbo x64 SIMD and build wiring updates (alii118154c)
  • Windows orderfile and startup tracing work (robobun1f4eaa0)
  • DNS callback argument validation fix (robobunc4618cd)
  • Argon2 low-memory hash verification fix (cirospaciaria8861fc)
  • GC scheduling tweak at entrypoint wait (dylan-conway35f4662)
  • Dependency/build/CI/tooling updates and test-only changes (6dfa8f4, c7eb848, 32e8703, others)