Bun & Ultra-Fast Native Package Resolution
Bun combines a JavaScript runtime with package installation and other development tools. Its package manager supports existing manifests and records resolutions in the text-based bun.lock file.
What is it?
bun install is Bun's package-manager command for projects with a package.json. Its implementation and installation policies differ from npm, so test the workflow rather than assuming every npm behavior is identical.
Current Bun uses the text-based bun.lock by default. The historical bun.lockb was binary; this format difference should not be confused with Yarn's lockfile syntax.
Why use it?
Installation time can matter in local development and CI. A different package manager may reduce that time, but results depend on the project, cache state, filesystem and machine.
Measure your own installation workload and check compatibility before switching. Implementation language alone does not establish a universal speed ratio.
How it works
To use it, you install Bun and run bun install in any directory with a package.json.
Bun resolves the manifest, uses its package cache and writes its own lockfile. Linking behavior depends on the platform and selected backend. In CI, --frozen-lockfile refuses an install that would require a lockfile update.
Interactive Demo
Explore the concept in action using the interactive visualization below.
Note: Bun bypasses the V8 JavaScript engine completely, parsing packages in native Zig code, resulting in an order-of-magnitude speedup.
Check yourself
Pick an answer to lock it in, then read why. Getting one wrong is part of how it sticks.
Remember this
- Compare package-manager performance on the actual project rather than assuming a fixed speedup.
- Current bun install normally writes the text-based bun.lock; bun.lockb is the historical binary format.
- Use --frozen-lockfile when CI must refuse changes to the resolved lockfile.
- Bun is more than a package manager; it's a runtime, test runner, and bundler.
Done with this concept?
Mark it complete to track your progress. No login needed.