Bun - Fast JavaScript runtime designed as a drop-in replacement for Node.js
Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable. At its core is the Bun runtime, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It is a fast, all-in-one toolkit for running, building, testing, and debugging JavaScript and TypeScript, from a single file to a full-stack application.
Bun is considered to be 5x faster than NodeJS. It has inbuilt support for reading .env files, Node monitoring, Http fetch, Web sockets. Bun transpiler can run .js
, .ts
, .cjs
, .mjs
, .jsx
, and .tsx
files. It supports both CommonJS to ES modules.
Bun is built using Apple's WebKit engine. WebKit is the engine that powers Safari and is used by billions of devices every day. It's fast, efficient, and has been battle-tested for decades.
Bun is orders of magnitude faster than npm, yarn, and pnpm. It uses a global module cache to avoid redundant downloads from the npm registry and uses the fastest system calls available on each operating system.
You can run Bun with --hot to enable hot reloading, which reloads your application when files change.