Bun v0.2.2
Bun v0.2.2 adds a TCP/TLS socket API for clients and servers. It defines callbacks once per server rather than per socket, and a TCP echo server runs 24% faster than in Node. The release also implements WebCrypto, which lets libraries such as jose run, along with fs.createReadStream and better Node.js stream support, Bun.peek for synchronously reading already-settled promises, and an official Homebrew tap. Bug fixes include a transpiler fix for default-plus-named imports of builtin modules, now rewritten to import.meta.require, and several segfault fixes.
Related posts
- Bun v1.2.6
Bun mediumAdept
Bun v1.2.6 fixes 74 bugs and rewrites more of node:crypto (Cipheriv/Decipheriv, DiffieHellman, ECDH, randomBytes) in native code on BoringSSL, with benchmarks showing AES-256-GCM going from ~1.15 ms to ~3.5 µs per iteration and scrypt from 365 ms to 47 ms. node:http compatibility work makes Express 9% and Fastify 5.4% faster. Other changes include hkdf and prime functions, initial node:test support backed by bun:test, a timeout option for Bun.spawn, PostgreSQL connections over Unix sockets in Bun.SQL, vm.compileFunction, module.children, and many Node.js compatibility fixes.
- Bun v1.2.5
Bun mediumAdept
Bun v1.2.5 fixes 75 bugs, adds 69 passing Node.js tests, and nearly rewrites its Node-API implementation, which now passes 98% of Node's js-native-api suite. The Node-API work gives each module its own napi_env, adds null-pointer error handling and detects module API versions. node:crypto Sign/Verify are reimplemented in C++ on BoringSSL (about 34x faster), and Hash/Hmac are now native. The release also adds Bun.CSRF, CSS modules, a Svelte plugin and a rewritten HMR system with import.meta.hot.accept, along with many node:net, timers and child_process compatibility fixes.
- Bun v1.4.1
Bun mediumAdept
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%.
- 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.
- 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.