Bun v1.1.29
Bun v1.1.29 adds N-API support to its `cc` C compilation feature, letting C code return JavaScript strings, objects and arrays, which also works for shared libraries loaded via `dlopen` in `bun:ffi`. A new `"buffer"` argument type in `bun:ffi` passes typed arrays to C with inline conversion instead of external calls, making a hash microbenchmark about 40% faster than wrapping with `ptr()` (48.6 ns vs 82.6 ns per call). The release also fixes 21 bugs, including axios proxying, bundling imported .wasm files, a symbol-reordering regression in `bun build`, `bun test` always updating snapshots, and missing system include directories for `cc`.
Related posts
- Compile and run C in JavaScript
Bun mediumAdept
Bun v1.1.28 adds experimental `cc` in `bun:ffi`, which uses TinyCC to compile, link and relocate C in memory and generates inline wrappers that convert between JavaScriptCore values and C primitives with no dynamic dispatch. It is pitched as an alternative to N-API addons, which need node-gyp builds or prebuilt platform matrices and cost 7–15ns per call versus 2ns for the JavaScriptCore C++ API, and to WebAssembly, which cannot make system calls and must copy data across its isolated memory. Benchmarks show about 5ms to compile a small file and roughly 2ns of per-call overhead over native C. It suits glue code for C and system libraries such as ffmpeg or the macOS Keychain, not large projects needing Clang/GCC-level optimization.
- Bun v1.3.7
Bun mediumAdept
Bun v1.3.7 upgrades JavaScriptCore, which brings faster async/await (35%), Array.from, padStart/padEnd, array.flat and better ARM64 codegen using ccmp/ccmn chains. It also speeds up Buffer.from() with arrays by up to 50% and Buffer.swap16/swap64 by 1.8x and 3.6x through CPU intrinsics. New APIs include Bun.wrapAnsi (33–88x faster than the wrap-ansi npm package), native JSON5 parsing and imports, and Bun.JSONL with streaming parseChunk. For diagnostics there is Markdown CPU and heap profile output, --heap-prof heap snapshots and the node:inspector Profiler API. Compatibility fixes cover header case preservation in fetch, S3 presign options, bun pm pack lifecycle scripts, Indic grapheme clustering and Next.js 16 timer internals.
- Bun v1.3.9
Bun mediumAdept
Bun v1.3.9 adds `bun run --parallel` and `--sequential` for running package.json scripts with prefixed output across workspaces, along with Node-compatible HTTP/2 connection upgrades via `net.Server`, `Symbol.dispose` support for test mocks, `NO_PROXY` handling for explicit proxies, `--cpu-prof-interval`, and ESM bytecode in `--compile`. A JavaScriptCore upgrade brings SIMD-accelerated RegExp prefix search on ARM64 and x86_64, JIT compilation of fixed-count parenthesized subpatterns (~3.9x faster), DFG/FTL intrinsics for `startsWith`, `Set/Map#size` (2.2-2.7x) and `trim`, and rope-returning `String#replace`. Fixes include SIGILL crashes on ARMv8.0 CPUs caused by mimalloc LSE atomics, a chunked-encoding request smuggling bug, and keep-alive hangs for proxy-style requests.
- Bun v1.1.19
Bun mediumAdept
Bun v1.1.19 enables JavaScriptCore's FTL JIT on Windows for the first time in nine years, making Object.entries about 20% faster and cutting Array.map overhead roughly in half. The release fixes 54 bugs: crashes with optional peer dependencies in bun install, non-recursive comma-expression folding that fixes stack overflows with aws-cdk-lib, nested TypeScript namespace transpilation, and memory leaks in new Request(request) and fs.readdir withFileTypes. It also fixes an AbortSignal issue where a BoringSSL option ignored TCP shutdowns on HTTPS. Other changes include restored Raspberry Pi 4 support, statically linked UCRT on Windows, preserved package.json indentation and .npmrc _auth support.
- 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.