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
curl -fsSL https://bun.sh/install | bashInstalling a Next.js app
warm cache · seconds (lower is better)
| runtime | version | install time | peak RAM |
|---|---|---|---|
| bun | v1.4 | 210 s | 12 MB |
| yarn | v1.22.22 | 1,760 s | 205 MB |
| pnpm | v11.21.0 | 1,920 s | 1.4 GB |
| npm | v12.0.2 | 4,450 s | 698 MB |
Serving Express over HTTPS
hello-world app · requests per second (higher is better)
| runtime | version | requests/sec | peak RAM |
|---|---|---|---|
| Bun | v1.4 | 48,243 req/s | 105 MB |
| Node.js | v26.7.0 | 25,181 req/s | 142 MB |
| Deno | v2.9.5 | 19,243 req/s | 176 MB |
Querying Postgres
100 rows × 100 queries in flight · queries per second (higher is better)
| runtime | version | queries/sec | peak RAM |
|---|---|---|---|
| Bun | v1.4 | 20,243 queries/s | 80 MB |
| Deno | v2.9.5 | 10,406 queries/s | 181 MB |
| Node.js | v26.7.0 | 10,000 queries/s | 168 MB |
Running a WebSocket chat server
32 clients broadcasting · messages per second (higher is better)
| runtime | version | messages/sec | peak RAM |
|---|---|---|---|
| Bun (publish) | v1.4 | 4,170,027 msgs/s | 51 MB |
| Bun (send) | v1.4 | 159,379 msgs/s | 37 MB |
| Deno | v2.9.5 | 124,088 msgs/s | 1.2 GB |
| ws (Node.js) | v26.7.0 | 123,486 msgs/s | 78 MB |
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.
$ bun run index.tsxPackage manager
replaces npm · yarn · pnpm
npm-compatible, up to 30× faster. Workspaces, catalogs, overrides, patches and a lockfile you can read.
$ bun installTest runner
replaces Jest · Vitest
Jest-compatible expect(), mocks, snapshots, DOM and coverage — starting in milliseconds.
$ bun testBundler
replaces esbuild · Vite · webpack
TS, JSX, CSS & HTML for browsers and servers. Dev server with HMR. Single-file executables.
$ bun build ./app.tsxA 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.
$ bun installbun install v1.4.2 (0aa2b1cd)🔍 Resolving [712/712]+ react@19.1.0+ react-dom@19.1.0+ next@15.4.1+ tailwindcss@4.1.11+ typescript@5.9.2 (+ 706 more)712 packages installed [1.18s]$
v1.4.2Latest release · September 2026
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.
$ bun upgrade- Upgraded JavaScriptCore with Intl and TypedArray fixes and cheaper Date objects
bun buildno longer renames a var onto a let in the same block (v1.4.1 regression that broke Elysia)AsyncLocalStorageexit() and nested run() no longer retain the outer storeworker_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.Imagedecodes CMYK and YCCK JPEGs.json()rejects invalid JSON with the same SyntaxError as JSON.parsebun installno longer panics on a lockfile with a mismatched package-name hash
In production
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.
Frameworks
Bun runs Next.js, Remix, Nuxt, Astro, SvelteKit, Hono, Elysia & friends.
Node.js compatibility means your framework already works. Swap npm run dev for bun --bun run dev and keep shipping — with Bun's SQL, S3 and shell APIs available right inside your route handlers.
import { s3, $, sql } from "bun";export default async function BlogPage({ params }) {const [post] = await sql`SELECT * FROM posts WHERE slug = ${params.slug}`;const img = s3.file(post.imageKey).presign();const words = await $`wc -w < ${post.file}`.text();