Bun is one file that does every job

What is actually in Bun? It is called a runtime, a package manager and a bundler at once. It is one file that does every job, where Node's set is several programs, npm among them, that only arrive together. Under both is an engine, and the layer round it is what differs.

  1. 01The question
  2. 02One file or several
  3. 03The engine underneath

01The question

Install Node and you get node in /usr/local/bin; install Bun and you get bun in ~/.bun/bin (Your shell finds a tool by searching folders in order covers how the shell finds each). Bun is described as a runtime, a package manager, a bundler and a test runner. So is there a binary for the runtime and another for the bundler somewhere in its folder? And what does Node, the classic one, ship instead?

Bun is one file, and every job is a word you give it. Node's set is several programs that arrive together, and one of them, npm, isn't Node at all. What they share is the part underneath, the engine, and what they differ in is the layer they build round it.

02One file or several

Installing Node gives you three files: node, npm and npx. They arrive together, and they aren't the same thing. node is the , about 190 MB of compiled code on a Mac. npm is a , and it is a JavaScript file whose first line is #!/usr/bin/env node, which means run me with whichever node PATH finds first. npm is a program Node runs. npx is a second script from the same package that runs a package without installing it for good.

Like macOS shipping Safari: it comes with the system, and it isn't the system. pnpm and Yarn do npm's job differently and arrive separately. Each still needs Node to run. pnpm's trick is that every version of every package is stored once on the disk, and projects get links to it instead of copies. A bundler such as Vite or esbuild is another install again. Each piece can be swapped, and you assemble the set yourself.

Bun is the other way round: one file, about 58 MB, that does every job. bun run, bun install, bun build and bun test are the same file told different things, and bunx is just a link back to it. There is no bundler binary to find. There is no Node inside it either: Bun is a runtime of its own that runs most Node code and npm packages unchanged.

Fig 01

Three names on PATH. node is 190 MB here; npm and npx are scripts it runs. The bundler is yours to install.

Five jobs. With Node they are spread over several programs, two of them scripts Node runs; with Bun they are one file.

npm isn't Node. It is a program written in JavaScript that Node runs, and Bun replaced it and the rest with one file.

Claude Code shows where that leads. Bun can compile a JavaScript program into one file with Bun's runtime inside it, and Claude Code ships that way, so it needs no Node of yours at all. Anthropic bought Bun in December 2025, citing that dependence. Docker takes the same idea as far as it goes, and ships every folder a program needs with it.

03The engine underneath

The processor only runs . The is the part that turns JavaScript into it, and it is the one piece Node, Bun and a browser can't do without. On its own it can only calculate. Round it, each one builds a layer that reaches files, the network or a page; the Your code runs inside a program you didn't write note calls that layer the and sets out all three parts. Node is V8 with a layer for servers. Chrome is V8 with a layer for pages. Bun is JavaScriptCore with a layer of its own.

"Node is written in C++" means both parts: V8 is C++, and so is much of the layer round it, though Node's own API is largely JavaScript on top. Bun's engine is C++ too, Apple's; only Bun's layer is written in Zig. They are two programs glued together, each written in whatever its makers chose.

The engine is shared and swappable. What makes Node, Bun, a browser or a host different is the layer round it, and what comes in the box.

Connected

Side threads

Questions that came up once the main idea began to hold, kept as they were asked. Each opens beside the paragraph it grew from.

Terms

Checked

What the chat had wrong or only half right, against sources. The note above already says the corrected thing.

  1. Bun runs TypeScript natively; Node needs it transpiled.Node also runs TypeScript files by default since 22.18 and 23.6, by stripping the types. Syntax that needs translating, such as enums, still doesn't work.Node.js docs, TypeScript
  2. Vercel runs your code on its servers, the traditional model.Server code runs as functions that Vercel starts and stops per request, on Node by default, with no server of yours to look after.Vercel docs, Functions
  3. Cloudflare Workers run your code on V8 directly, with no runtime layer.There is a runtime round V8, workerd. It isn't Node, though it can offer many Node APIs when asked.Cloudflare, workerd
  4. With code copied before npm install, a code change reuses the npm install layer.Once one step's input changes, every step after it runs again. Copy the package files first, install, then copy the code.Docker docs, Build cache
  5. Each Dockerfile line, CMD included, becomes a layer.Only RUN, COPY and ADD add a layer of files. CMD and the others are settings stored with the image.Docker docs, Understanding image layers
  6. Containers on a Mac share the macOS kernel.They share a Linux kernel, in a virtual machine Docker Desktop runs.Docker docs, Docker Desktop on Mac
  7. Node is C++ all the way through, engine and layer.V8 is C++. Round it, Node has C++ bindings, libuv for its event loop (in C), and much of its API in JavaScript, in lib/.Node.js source
  8. npm is made by the npm company.npm, Inc. was bought by GitHub in 2020; GitHub runs npm now.GitHub blog, 2020