RuntimePackage ManagerBundlerTest RunnerLinterFormatterGuidesReferenceBlogFeedback
API REFERENCE

The right API, in the right place.

Bun puts the runtime, HTTP server, SQL, testing, and bundler in one toolkit. Browse the core APIs by topic — every section links to full docs and runnable examples.

Runtime APIs

Bun.serve, file I/O, SQLite, S3, hashing, environment variables, and the Node.js compatibility layer.

HTTP & networking

A native HTTP server, routing, WebSockets, TLS, TCP, UDP, and DNS.

Data & storage

Built-in SQLite, a Postgres client, Redis, S3, streams, and binary data.

Command line

Run, install, test, bundle, lint, and format.

Testing

A Jest-compatible test runner with snapshots, DOM, mocks, coverage, and watch mode.

Bundler

Build TypeScript, JSX, CSS, and HTML for browsers and servers.