What is Bun?
Bun is a fast all-in-one JavaScript runtime built from scratch to serve the modern JavaScript ecosystem. It's designed as a drop-in replacement for Node.js with significantly better performance, featuring a built-in bundler, test runner, and package manager all in a single executable.
๐ฅ Key Features of Bun
โก Blazing Fast
Up to 4x faster than Node.js for many workloads, with optimized JavaScript engine and native code compilation.
๐ฆ Built-in Package Manager
Install packages up to 25x faster than npm with built-in package management and lockfile compatibility.
๐ ๏ธ Bundler Included
Native bundler with tree-shaking, code splitting, and hot reloading - no webpack or rollup needed.
๐งช Test Runner
Built-in test runner compatible with Jest API, with parallel execution and watch mode.
๐ Node.js Compatible
Drop-in replacement for Node.js with excellent compatibility for existing npm packages and APIs.
๐ TypeScript Native
Run TypeScript files directly without compilation step, with built-in transpilation.
๐ฆ Installation from debian.griffo.io
Step 1: Add Repository
๐ Available Bun Packages
debian.griffo.io provides three different Bun packages to suit different needs:
Metapackage that automatically installs the latest stable bun-one. This is the recommended choice for most users as it ensures you always get the latest stable release.
Latest stable release of Bun runtime. This package contains the production-ready version with optimizations for performance and stability.
Profiling-enabled build of Bun with debugging symbols and profiling capabilities. Ideal for development, debugging, and performance analysis. Slightly larger binary with additional debugging information.
๐ Managing Multiple Bun Versions
You can install both bun-one
and bun-profile
simultaneously and switch between them using Debian's update-alternatives system:
Install both versions:
Configure alternatives (done automatically during package installation):
Switch between versions interactively:
Check current version:
Step 2: Install Bun
Step 3: Verify Installation
๐ Quick Start Examples
Create a new project:
Install packages (faster than npm):
Run TypeScript directly:
Bundle for production:
Run tests:
๐ง Configuration
Bun can be configured using a bunfig.toml
file in your project root or home directory:
โก Performance Benefits
๐ฆ Package Installation
Up to 25x faster than npm, 4x faster than pnpm for installing dependencies.
๐ Runtime Performance
4x faster than Node.js for many JavaScript workloads with optimized engine.
๐ ๏ธ Bundling Speed
Native bundler significantly faster than webpack, rollup, or esbuild.
๐งช Test Execution
Parallel test execution with built-in runner, faster than Jest or Vitest.
๐ฆ Package Build Repository
The Debian packages are automatically built and maintained in this GitHub repository:
- ๐ฅ bun-debian - Latest release builds
๐ Related Packages
Enhance your development workflow with these complementary tools from debian.griffo.io:
- Zig Programming Language - Systems programming language
- uv Python Manager - Fast Python package manager
- Ghostty Terminal - Fast terminal emulator
- lazygit - Terminal UI for git