# bun | Bun | Knowledge Base | Instagit

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one

GitHub Stars: 87.7k

Repository: https://github.com/oven-sh/bun

---

## Articles

### [How to Deploy Bun Applications to Production: Docker and Lambda Guide](/oven-sh/bun/deploy-bun-applications-production)

Deploy Bun applications to production efficiently using Docker containers or AWS Lambda layers. Learn to leverage pre-built binaries without compilation for faster deployments.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Perform Memory Management and Debugging in Bun: Zig Allocators and Debug Flags Explained](/oven-sh/bun/bun-memory-management-debugging)

Master Bun memory management and debugging. Learn Zig allocators and debug flags for efficient development and performance optimization. Unlock Bun's potential.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Configure Loaders for Custom File Types in Bun: A Complete Plugin Guide](/oven-sh/bun/bun-custom-file-type-loaders-configuration)

Learn to configure loaders for custom file types in Bun. Create a plugin with the onLoad hook to map your file types to built-in loaders like text, css, or ts for seamless integration.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use bunx to Run Package Binaries in Bun](/oven-sh/bun/bunx-run-package-binaries)

Learn how to use bunx to run package binaries in Bun. Execute npm package binaries instantly without installation using this powerful npm equivalent.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Build Single-File Executables with Bun for Distribution](/oven-sh/bun/bun-single-file-executables-distribution)

Easily build single-file executables with Bun for distribution. Compile your JS or TS app into a native binary with the embedded Bun runtime, no separate installation required.

- Tags: how-to-guide
- Published: 2026-02-28

### [How Bun Handles Environment Variables at Runtime: A Deep Dive into the Zig Implementation](/oven-sh/bun/bun-environment-variable-handling-runtime)

Discover how Bun handles environment variables at runtime. Explore the native OS integration, .env parsing, and unified JavaScript exposure via process.env Bun.env and import.meta.env.

- Tags: deep-dive
- Published: 2026-02-28

### [How to Work with Web APIs Like fetch, Request, and Response in Bun](/oven-sh/bun/bun-web-api-compatibility-fetch-request-response)

Learn to use Bun's native Fetch API, including Request and Response objects. Explore browser-standard compliance and Node.js conveniences for seamless web development.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use Bun.spawn for Child Process Management in Bun](/oven-sh/bun/bun-spawn-child-process-management)

Master Bun.spawn for child process management. Learn to create, control, and manage child processes efficiently with Bun's powerful low-level API.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Implement HTTP Streaming and Server-Sent Events in Bun](/oven-sh/bun/bun-http-streaming-server-sent-events)

Learn to implement HTTP streaming and Server-Sent Events in Bun using native Web Streams integration. Effortlessly handle backpressure and cleanup with standard controllers.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use Bun.Transpiler for Runtime Code Transformation: A Complete Guide](/oven-sh/bun/bun-transpiler-runtime-code-transformation)

Learn to use Bun.Transpiler for runtime code transformation. This guide explains how to convert TypeScript and JSX to JavaScript instantly with Bun's fast engine.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Debug Bun Applications with VS Code: Complete Configuration Guide](/oven-sh/bun/debug-bun-applications-vs-code)

Effortlessly debug Bun applications in VS Code. Install the official extension, configure launch.json, and start debugging with F5. Your complete guide to troubleshooting Bun.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Configure Module Resolution and Import Aliases in Bun Projects](/oven-sh/bun/bun-module-resolution-import-aliases-configuration)

Configure module resolution and import aliases in Bun JS. Bun leverages tsconfig.json paths for runtime resolution, simplifying your build process without extra tools.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Implement Worker Threads in Bun for Parallel Processing: Complete Guide with Examples](/oven-sh/bun/bun-worker-threads-parallel-processing)

Learn to implement worker threads in Bun for powerful parallel processing. This complete guide uses Bun's high-performance Web Worker foundation for efficient computation. Get started today!

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use bun:sqlite for Embedded Database Operations in Bun Applications](/oven-sh/bun/bun-sqlite-embedded-database-operations)

Master embedded database operations in Bun apps with bun:sqlite. Embed a zero-config SQL database directly in your JS or TS code using the built-in Database and Statement classes.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Configure bunfig.toml for Project-Specific Bun Settings: Complete Reference Guide](/oven-sh/bun/bunfig-toml-project-specific-settings-configuration)

Configure bunfig.toml for project-specific Bun settings. Define runtime, test, and package manager defaults easily. Learn how to manage Bun configuration for your projects.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Set Up Hot Module Replacement (HMR) in Bun for Automatic Development Reloads](/oven-sh/bun/bun-hmr-setup-development-automatic-reloads)

Learn how to set up Hot Module Replacement HMR in Bun for automatic development reloads. Utilize import.meta.hot and Bun.serve for seamless module updates without page refreshes.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use bun:ffi to Call Native C Functions from JavaScript in Bun](/oven-sh/bun/bun-ffi-call-native-c-functions-javascript)

Master bun ffi to effortlessly call native C functions from JavaScript in Bun for near-native performance. Learn to dynamically load libraries and optimize function calls.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Write and Run Tests Using Bun's Built‑in Test Runner](/oven-sh/bun/bun-test-runner-writing-running-tests)

Learn to write and run tests with Bun's built-in test runner. Discover TypeScript support, snapshots, mocks, and watch mode all dependency-free with bun test.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Configure Bun's Bundler for Production Builds with Tree-Shaking](/oven-sh/bun/bun-bundler-production-builds-tree-shaking)

Learn to configure Bun's bundler for production builds using tree-shaking. Enable dead-code elimination for smaller, faster code in your next project.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Perform File System Operations Using Bun.file in Bun](/oven-sh/bun/bun-file-filesystem-operations-read-write)

Learn to perform file system operations like reading and writing files using Bun.file and Bun.write in Bun. Discover async methods for streamlined file handling.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Use WebSockets in Bun for Real-Time Bidirectional Communication](/oven-sh/bun/bun-websockets-realtime-bidirectional-communication)

Learn how to use WebSockets in Bun for real-time bidirectional communication. Bun's native implementation makes upgrading HTTP requests and handling messages simple and efficient.

- Tags: how-to-guide
- Published: 2026-02-28

### [How to Set Up Bun.serve with TLS/SSL Configuration for Secure HTTPS Servers](/oven-sh/bun/bun-serve-tls-ssl-configuration)

Secure your Bun.serve with TLS/SSL configuration. Learn to set up HTTPS, handle multi-domain SNI, and protect your web servers efficiently.

- Tags: how-to-guide
- Published: 2026-02-28

### [How Bun's Event Loop Differs from Node.js: JavaScriptCore Performance Explained](/oven-sh/bun/bun-event-loop-vs-nodejs-performance-javascriptcore)

Discover how Bun's event loop outperforms Node.js using JavaScriptCore and uSockets for faster JavaScript execution and reduced overhead. Learn the technical differences.

- Tags: deep-dive
- Published: 2026-02-28

