Bun 1.4 is out, and the headline change is structural: the runtime has been rewritten from Zig to Rust. Claude Code has run on the Rust port for months, and Prisma built its Prisma Compute product on it. The release also fixes over 2,900 issues.
Node.js compatibility took its biggest jump since Bun 1.0. Bun now runs 1,517 additional tests from the Node.js test suite on every commit. node:http, node:fs, node:cluster, node:timers, node:zlib, node:vm and node:stream pass 97% of Node's own tests, node:quic passes 99%, and node:events, node:trace_events and node:sqlite pass 100%. Playwright, vitest with coverage, Next.js 16.3 with Turbopack and the React Compiler, OpenTelemetry instrumentation and Datadog's dd-trace now all run on Bun. Packages that newly work without changes include Nuxt, testcontainers, amqplib, TypeORM, nock, Fastify's inject() and the AWS S3 client's streaming uploads.
Resource usage drops across the board. Bun consolidated on the mimalloc allocator, extended with partial page clearing and a scavenger thread that frees memory while JavaScript idles. Claude Code's production CPU usage fell by half: p99 from 24% to 10%, p50 from 5.8% to 2.5%. A trivial app's idle CPU drops 5x. HTTP server workloads use 13% to 48% less memory; a Fastify benchmark peaks at 120 MB versus 233 MB on Bun 1.3. A Next.js App Router SSR pattern that leaked without bound in 1.3 now settles at 238 MB over 4,000 pages, below Node's 410 MB.
Startup is 2.5x faster on Windows (15.5 ms for hello.js, versus 40.1 ms for Node.js 26) and 2x faster on Linux at 5.1 ms with less than half the memory. Linux and Windows binaries shrink by up to 17%.
ReadableStream, WritableStream and TransformStream are now native and pass 100% of the Web Platform Tests. In Bun's 64 MB pipeline benchmarks, a download through DecompressionStream and TextDecoderStream runs at 1,519 MB/s versus 204 MB/s on Node.js 26 and 530 MB/s on Deno 2.9. CompressionStream and DecompressionStream are implemented natively, with gzip decompression at 2,291 MB/s against Node's 491 MB/s. Response.clone() and Request.clone() now share body chunks instead of copying, cutting peak memory and time by roughly a third versus Bun 1.3. Bun.serve now applies backpressure to stream bodies, so a slow client holds at most one buffer of server memory.
The standard library grows to absorb 15 common npm dependencies. Bun.Image decodes, resizes, rotates and encodes JPEG, PNG, WebP, GIF and BMP with a sharp-like API, no native addon needed, and is 1.38x faster than sharp on a resize-and-encode pipeline. Bun.WebView drives headless browser automation via system WebKit on macOS or an installed Chrome, Chromium or Edge elsewhere. Bun.markdown parses GFM to HTML strings, React elements or custom render callbacks, with a warning that HTML output is not sanitized. Bun.cron() registers jobs with the OS scheduler (crontab, launchd or Task Scheduler) or runs functions on the event loop. Bun.Terminal is a built-in PTY replacing node-pty. bun run --parallel executes scripts concurrently with prefixed output, replacing npm-run-all and concurrently. Bun.serve routes can now serve directories with sendfile, ETag, Range and 304 handling, protected on Linux by openat2 with O_RESOLVE_BENEATH against symlink escapes. New APIs cover JSON5, XML, tar archives and ANSI-aware string helpers.
bun:ffi moves onto new FFI support built directly into JavaScriptCore, replacing TinyCC. Hot call sites get JIT-compiled into direct C calls. A no-op FFI call drops from 2.13 ns to 0.70 ns, a 3x gain. A new buffer_length argument type passes a TypedArray's length alongside its pointer, and returns: "cstring" yields plain strings or null.
Observability gets Markdown-native tooling. --cpu-prof-md and --heap-prof-md emit CPU and heap profiles as Markdown reports readable over SSH or pasteable into bug reports and LLMs; classic .cpuprofile and .heapsnapshot output remains, and BUN_CPU_PROFILE=1 profiles processes that cannot receive flags. Async stack traces now point errors from fs.promises, fetch(), S3, DNS or crypto back to the originating await. process.on("memoryPressure") fires when the OS runs low on memory, on macOS, Linux and Windows.
Networking adds experimental HTTP/3 in Bun.serve (http3: true, 2.7x faster than HTTPS/1.1 on a static-route benchmark, not production-ready) and experimental HTTP/2 and HTTP/3 clients in fetch() behind flags. Upgrade with bun upgrade.
Comments
No comments yet — be the first.
Open the discussion
No account or password needed — just enter your e-mail and we’ll send you a one-time sign-in link. First time here? You’re set up automatically.
Your rating will be applied automatically after you sign in.
Check your inbox
We’ve sent a sign-in link to …. Open it on this device — this tab will sign you in automatically.
Nothing arrived? Check your spam folder — and mark the mail as "Not spam" so it lands in your inbox next time.