Bun: JavaScript runtime, bundler, and package manager
Fast JavaScript runtime with built-in bundler and package manager.
Learn more about Bun
Bun is a modern JavaScript runtime, package manager, and bundler built from the ground up using the JavaScriptCore engine and written in Zig for performance optimization. The runtime provides native APIs for common operations like file I/O and SQLite database access through built-in modules that bypass the need for external dependencies. It implements fast file system operations using direct system calls and includes an embedded SQLite driver that supports prepared statements, transactions, and synchronous query execution. The architecture prioritizes startup time and execution speed by bundling core functionality directly into the runtime rather than relying on separate packages. Bun achieves significant performance improvements over traditional Node.js workflows through optimized native implementations of package management, transpilation, and module resolution.
Zig and JavaScriptCore implementation
Bun is written in Zig and uses JavaScriptCore as its JavaScript engine, which differs from Node.js's V8 engine. This architectural choice affects startup time, memory usage, and runtime characteristics.
Integrated toolchain
Rather than separate tools, Bun combines runtime, bundler, test runner, and package manager into a single executable. This reduces the number of dependencies and configuration files needed for JavaScript projects.
Built-in TypeScript and JSX support
Bun handles TypeScript and JSX files natively without requiring separate build steps or configuration. Files are transpiled on execution without generating intermediate files.
// Create a simple HTTP server using Bun's built-in server
const server = Bun.serve({
port: 3000,
fetch(request) {
const url = new URL(request.url);
if (url.pathname === '/') {
return new Response('Hello from Bun!', {
headers: { 'Content-Type': 'text/plain' }
});
}
if (url.pathname === '/json') {
return Response.json({ message: 'Hello World', timestamp: Date.now() });
}
return new Response('Not Found', { status: 404 });
},
});
console.log(`Server running at http://localhost:${server.port}`);See how people are using Bun
Top in Developer Tools
Related Repositories
Discover similar tools and frameworks used by developers
Colima
Lima-based container runtime provisioning for macOS and Linux.
Create React App
Zero-configuration React scaffolding tool with preconfigured toolchain.
Create T3 App
Interactive CLI for scaffolding typesafe Next.js applications with the T3 Stack technology combination.
HTTPX
Fast HTTP probing with response metadata extraction.
Lighthouse
Open-source tool that analyzes web pages for performance, accessibility, and SEO, generating actionable reports.
Related Reading
Guides and comparisons from the Greptile content library
AI Coding Tools: A 2026 Guide to Every Category
A 2026 guide to every category of AI coding tool: assistants, editors, code generators, code review, and testing tools.
Best CodeRabbit Alternatives for Smarter AI Code Reviews in 2026
7 powerful CodeRabbit alternatives ranked by real dev teams. Feature comparison, pricing analysis, and honest reviews to find your perfect AI code reviewer.
10 Powerful Code Quality Tools That Catch Bugs Before Deployment
We tested 10 code quality tools that catch bugs before production. Detailed comparison with real-world examples, pricing, and ROI analysis for dev teams.
How to ACTUALLY Think About Code Reviews: The 3-Layer Checklist
A code review checklist and best practices organized around three layers — Mechanical, Structural, and Narrative — that help any team improve code quality without slowing reviews down.