Bun has joined Anthropic — and Anthropic is betting on Bun →
NEW Bun v1.4.2 released →
Bun is a fast JavaScript runtime & toolkit. All in one.
Runtime, package manager, test runner and bundler in a single binary. Use bun install or bun test in an existing Node.js project, or run the whole thing on Bun.
Install Bun v1.4.2

Installing a Next.js app
warm cache · seconds (lower is better)

bun
v1.4
0.21s
yarn
v1.22.22
1.76s
pnpm
v11.21.0
1.92s
npm
v12.0.2
4.45s
0s ········· 1s ········· 2s ········· 3s ········· 4s ········· 5s
T3-stack app, 25 direct dependencies, ~220 packages in the lockfile · warm cache · lockfile present · node_modules removed · Linux x64, EPYC 9R14 · every package manager at defaults · medians of 3
Serving Express over HTTPS
hello-world app · requests per second (higher is better)
req/s peak RAM

hello-world app · express 5.2.1 · bombardier -c 50 -d 5s · TLS 1.3 · Linux x64, EPYC 9R14 · medians of 3
Querying Postgres
100 rows × 100 queries in flight · queries per second (higher is better)
queries/s peak RAM

SELECT 100 rows · 100 queries in flight · 100k queries total · localhost PostgreSQL 18.3 · Bun.sql vs postgres.js 3.4.9 · Linux x64, EPYC 9R14 · medians of 3
Running a WebSocket chat server
32 clients broadcasting · messages per second (higher is better)
msgs/s peak RAM
Used by












Four tools, designed together.
Adopt one, or all of them.
bun install and bun test drop into existing Node.js projects. No runtime switch required.
Runtime
replaces Node.js
Runs JavaScript & TypeScript on JavaScriptCore. Node.js APIs, node_modules and your framework work as-is.
Package manager
replaces npm · yarn · pnpm
npm-compatible, up to 30× faster. Workspaces, catalogs, overrides, patches and a lockfile you can read.
Test runner
replaces Jest · Vitest
Jest-compatible expect(), mocks, snapshots, DOM and coverage — starting in milliseconds.
Bundler
replaces esbuild · Vite · webpack
TS, JSX, CSS & HTML for browsers and servers. Dev server with HMR. Single-file executables.
A minute with Bun
One binary for the whole workflow.
Install, develop, run, test and ship with the same tool. Every step below is a real command with real output — click one, or just watch.
01 Install dependencies
Reads your package.json, migrates your lockfile, and installs from a global cache — up to 30× faster than npm. Docs
02 Start a frontend dev server
Point Bun at an HTML file: React, TypeScript, Tailwind and CSS just work, with hot reloading that keeps state. Docs
03 Run TypeScript directly
No build step, no ts-node. Bun.serve() handles HTTP, routing and WebSockets; SQL, Redis and S3 clients are built in. Docs
04 Run your test suite
Jest-compatible expect(), mocks, snapshots and DOM testing — starting in milliseconds instead of seconds. Docs
05 Ship a single binary
Bundle your app and the Bun runtime into one executable. Cross-compile for Linux, macOS and Windows from any machine. Docs

~/my-app — bun
03 / 05
[2.45ms] Server started with built-in WebSocket support
Elysia regression fixed. Upgraded JavaScriptCore. CMYK JPEGs in Bun.Image.
Bun 1.4.2 fixes 7 issues, including two v1.4.1 regressions: a bun build rename bug impacting Elysia apps and an AsyncLocalStorage memory leak. It also fixes worker_threads 'online' ordering, GC and JIT crashes, CMYK JPEG decoding in Bun.Image and a bun install lockfile panic, and upgrades JavaScriptCore.
- Upgraded JavaScriptCore with Intl and TypedArray fixes and cheaper Date objects
- bun build no longer renames a var onto a let in the same block (v1.4.1 regression that broke Elysia)
- AsyncLocalStorage exit() and nested run() no longer retain the outer store
- worker_threads 'online' arrives before the worker's first messages, unblocking @discordjs/ws
- Fixed a rare JIT crash in long-running processes and a GC crash on musl
- Bun.Image decodes CMYK and YCCK JPEGs
- .json() rejects invalid JSON with the same SyntaxError as JSON.parse
- bun install no longer panics on a lockfile with a mismatched package-name hash
Bun in production
Claude Code ships to millions of developers as a Bun executable. Midjourney pushes every image notification through Bun's WebSocket server. Railway runs its serverless functions on it. Hear it from them:

Claude Code
Claude Code ships to every developer as a Bun single-file executable.
Claude Code is a single file with Bun inside it. Users download it and run it. There is no install step and no startup lag.

Midjourney
Every image notification Midjourney sends goes through Bun's WebSocket server.
Pub/sub, backpressure and per-message compression are built into Bun.serve() — no ws, no socket.io, no sidecar.

Railway
Railway built its serverless Functions product on Bun.
A Railway Function is a TypeScript file. Bun runs it as-is, so a deploy skips the build and a cold start takes milliseconds.

VP of Developer Experience, Cursor
FRAMEWORKS
Bun runs Next.js, Remix, Nuxt, Astro, SvelteKit, Hono, Elysia & friends.
bun install
The fastest install in every situation you actually hit.
Cold cache, warm cache, CI, a no-op reinstall — one T3-stack Next.js app, 25 direct dependencies, ~220 packages in the lockfile, measured six ways against npm, pnpm and yarn at their defaults.
First install, ever
bun 1.41s
npm 18.12s
pnpm 13.49s
yarn 20.51s
10–15× faster RAM 376 MB vs pnpm 1.8 GB
Fresh checkout, warm cache
bun 251ms
npm 7.61s
pnpm 2.38s
yarn 1.83s
7–30× faster RAM 52 MB vs pnpm 1.1 GB
CI without a cache
bun 951ms
npm 4.92s
pnpm 11.69s
yarn 17.61s
5–19× faster RAM 214 MB vs pnpm 2.7 GB
CI with a warm cache
bun
Everything built in. Nothing weighing it down.
All-in-one usually means heavier. Bun goes the other way: the same runs as the benchmarks above, measured by peak resident memory, come in under Node.js and Deno while doing more work per second. One binary, more throughput, less RAM.
Serving Express over HTTPS
Running a WebSocket chat server
Installing a Next.js app
Linux x64, AMD EPYC 9R14 (64 vCPU), kernel 6.1 · medians of 3 · full methodology in each benchmark's README.
Batteries included
The APIs you need, baked in.
Most servers need an HTTP stack, a database client, Redis, S3, hashing and a way to shell out. Bun ships all of them, so that is a stack of packages you never install or patch.
Bun.serve() with routes, params and static responses.
Pub/sub WebSocket server, built into Bun.serve().
Bun.sql — tagged templates, pipelining, transactions.
A fast Redis client with Pub/Sub — no driver to install.
Read, write and presign objects on any S3-compatible store.