- Web APIs like fetch, WebSocket, and ReadableStream are built-in
node_modules
bun implements Node.js' module resolution algorithm, so you can use npm packages in bun.js. ESM and CommonJS are supported, but Bun internally uses ESM.
- In bun.js, every file is transpiled. TypeScript & JSX just work.
- bun supports
"paths"
,"jsxImportSource"
and more from tsconfig.json files
- Bun.Transpiler bun's JSX & TypeScript transpiler is available as an API in Bun.js
- use the fastest system calls available with Bun.write to write, copy, pipe, send and clone files.
- bun.js automatically loads environment variables from .env files. No more
require("dotenv").config()
- bun ships with a fast SQLite3 client built-in bun:sqlite
- Node-API bun.js implements most of Node-API (N-API). Many Node.js native modules just work.
- bun:ffi call native code from JavaScript with bun's low-overhead foreign function interface
- node:fs node:path bun.js natively supports a growing list of Node.js core modules along with globals like Buffer and process.