# Bun

URL: https://softwaredictionary.org/terms/bun
Category: Backend & APIs
Last updated: 2026-10-06

In short: Bun is a fast JavaScript and TypeScript runtime that is also a package manager, bundler and test runner, designed as a drop-in replacement for Node.js.

## What is Bun?

Bun is an all-in-one toolkit for JavaScript and TypeScript that ships as a single program called `bun`. At its core is a runtime that runs code outside the browser, like Node.js, but instead of Google's V8 engine it uses JavaScriptCore, the engine behind Safari, and it is written in Zig, a low-level systems language. Jarred Sumner started the project; version 1.0 came out in 2023, and Windows support followed in 2024.

The same executable replaces several tools. `bun install` is an npm-compatible package manager that installs dependencies much faster and records them in a `bun.lock` file, `bun run` starts TypeScript and JSX files directly, `bun test` is a Jest-compatible test runner, and `bun build` bundles code for the browser. Built-in APIs such as `Bun.serve` for HTTP servers and `bun:sqlite` for SQLite cover common jobs without extra packages. Picture a Swiss Army knife where a typical Node.js setup carries a separate knife, screwdriver and scissors.

Teams use Bun to speed up installs and test runs in existing Node.js projects, to run TypeScript scripts with no configuration, and to build web servers and command-line tools. In December 2025, Bun was acquired by Anthropic, which builds its coding tools on it; the project stays open source under the MIT license.

Bun is most often compared with Node.js. It implements Node.js's built-in modules, such as `node:fs` and `node:http`, reads `package.json` and `node_modules`, and runs most npm packages unchanged, so the main differences are speed, startup time and the tools included. Compatibility is high but not complete, so packages that depend on Node.js internals can still behave differently, and Node.js has a much longer track record in production. Deno, the third major runtime, adds a permission system that neither Bun nor Node.js turns on by default.

## Key takeaways

- Bun is a JavaScript and TypeScript runtime built on JavaScriptCore and written in Zig.
- One executable is also a package manager, bundler and test runner.
- It aims to be a drop-in replacement for Node.js and runs most npm packages.
- Fast installs and startup are its main draw; compatibility is high but not complete.
- Since December 2025 it has been owned by Anthropic and is still MIT-licensed open source.

## Example: One tool for running, installing, testing and bundling

```bash
# Install dependencies from package.json (npm-compatible, writes bun.lock)
bun install

# Run TypeScript directly, with no build step or config
bun run server.ts

# Run a package.json script, or the Jest-compatible tests
bun run dev
bun test

# Bundle for the browser
bun build ./src/index.ts --outdir ./dist

# Run a package's command without installing it, like npx
bunx cowsay "Hello from Bun"
```

## Frequently asked questions

**What is the difference between Bun and Node.js?**

Both run JavaScript outside the browser and use the same npm packages. Node.js uses the V8 engine and ships with npm, leaving bundling to separate tools, while Bun uses JavaScriptCore, starts faster and builds in its own package manager, bundler and test runner.

**Can I use Bun with an existing Node.js project?**

Often, yes. You can start by using only `bun install` or `bun test` while the app keeps running on Node.js, then try `bun run` once the tests pass, since a few packages may still behave differently.

**Is Bun production-ready?**

Bun has had stable releases since version 1.0 in 2023, and many teams run it in production. It is still worth running your test suite on it first, because compatibility with every Node.js API and package is not guaranteed.

## Sources

- [Bun documentation: Welcome to Bun](https://bun.com/docs)
- [Bun documentation: Node.js Compatibility](https://bun.com/docs/runtime/nodejs-compat)

---

Software Dictionary: https://softwaredictionary.org/ · https://softwaredictionary.org/llms.txt
