Repository: oven-sh/bun
Stars: 89168
CLAUDE.md
This is the Bun repository - an all-in-one JavaScript runtime & toolkit designed for speed, with a bundler, test runner, and Node.js-compatible package manager. It's written primarily in Zig with C++ for JavaScriptCore integration, powered by WebKit's JavaScriptCore engine.
Building and Running Bun
Build Commands
- Build Bun: bun bd
- Creates a debug build at ./build/debug/bun-debug
- CRITICAL: do not set a timeout when running bun bd
- Run tests with your debug build: bun bd test <test-file>
- CRITICAL: Never use bun test directly - it won't include your changes
- Run any command with debug build: bun bd <command>
- Run with JavaScript exception scope verification: BUN_JSC_validateExceptionChecks=1
BUN_JSC_dumpSimulatedThrows=1 bun bd <command>
Tip: Bun is already installed and in $PATH. The bd subcommand is a package.json script.
All build scripts support build-then-exec. Any bun run build* command (and bun bd, and bun scripts/build.ts directly) accepts trailing args which are passed to the built executable after building. This is the recommended way to run your build — you never invoke ./build/debug/bun-debug directly.
bun bd test foo.test.ts # debug build + quiet debug logs
bun run build test foo.test.ts # debug build
bun run build:release -p 'Bun.version' # release build
bun run build:local run script.ts # debug build with local WebKitWhen exec args are present, build output is suppressed unless the build fails — you see only the binary's output. Build flags (e.g. --asan=off) go before the exec args; see scripts/build.ts header for the full arg routing rules.
Comparing builds: normally use the default build/<profile>/ dir. If you need to preserve a build as a comparison point (rare — e.g. benchmarking before/after a change), --build-dir parks it somewhere the next build won't overwrite:
bun run build:release --build-dir=build/baselineChanges that don't require a build
Edits to TypeScript type declarations (packages/bun-types//*.d.ts) do not touch any compiled code, so bun bd is unnecessary. The types test just packs the .d.ts files and runs tsc against fixtures — it never executes your build. Run it directly with the system Bun:
bun test test/integration/bun-types/bun-types.test.tsThis is an explicit exception to the "never use bun test directly" rule. There are no native changes for a debug build to pick up, so don't wait on one.
Testing
Running Tests
- Single test file: bun bd test test/js/bun/http/serve.test.ts
- Fuzzy match test file: bun bd test http/serve.test.ts
- With filter: bun bd test test/js/bun/http/serve.test.ts -t "should handle"
Test Organization
If a test is for a specific numbered GitHub Issue, it should be placed in test/regression/issue/${issueNumber}.test.ts. Ensure the issue number is REAL and not a placeholder!
If no valid issue number is provided, find the best existing file to modify instead, such as;
- test/js/bun/ - Bun-specific API tests (http, crypto, ffi, shell, etc.)
- test/js/node/ - Node.js compatibility tests
- test/js/web/ - Web API tests (fetch, WebSocket, streams, etc.)
- test/cli/ - CLI command tests (install, run, test, etc.)
- test/bundler/ - Bundler and transpiler tests. Use itBundled helper.
- test/integration/ - End-to-end integration tests
- test/napi/ - N-API compatibility tests
- test/v8/ - V8 C++ API compatibility tests
Writing Tests
Tests use Bun's Jest-compatible test runner with proper test fixtures.
- For single-file tests, prefer -e over tempDir.
- For multi-file tests, prefer tempDir and Bun.spawn.
import { test, expect } from "bun:test";
import { bunEnv, bunExe, normalizeBunSnapshot, tempDir } from "harness";test("(single-file test) my feature", async () => {
await using proc = Bun.spawn({
cmd: [bunExe(), "-e", "console.log('Hello, world!')"],
env: bunEnv,
});
const [stdout, stderr, exitCode] = await Promise.all([
proc.stdout.text(),
proc.stderr.text(),
proc.exited,
]);
expect(normalizeBunSnapshot(stdout)).toMatchInlineSnapshot("Hello, world!");
expect(exitCode).toBe(0);
});
test("(multi-file test) my feature", async () => {
// Create temp directory with test files
using dir = tempDir("test-prefix", {
"index.js": import { foo } from "./foo.ts"; foo();,
"foo.ts": export function foo() { console.log("foo"); },
});
// Spawn Bun process
await using proc = Bun.spawn({
cmd: [bunExe(), "index.js"],
env: bunEnv,
cwd: String(dir),
stderr: "pipe",
});
const [stdout, stderr, exitCode] = await Promise.all([
proc.stdout.text(),
proc.stderr.text(),
proc.exited,
]);
// Prefer snapshot tests over expect(stdout).toBe("hello\n");
expect(normalizeBunSnapshot(stdout, dir)).toMatchInlineSnapshot("hello");
// Assert the exit code last. This gives you a more useful error message on test failure.
expect(exitCode).toBe(0);
});
- Always use port: 0. Do not hardcode ports. Do not use your own random port number function.
- Use normalizeBunSnapshot to normalize snapshot output of the test.
- NEVER write tests that check for no "panic" or "uncaught exception" or similar in the test output. These tests will never fail in CI.
- Use tempDir from "harness" to create a temporary directory. Do not use tmpdirSync or fs.mkdtempSync to create temporary directories.
- When spawning processes, tests should expect(stdout).toBe(...) BEFORE expect(exitCode).toBe(0). This gives you a more useful error message on test failure.
- CRITICAL: Do not write flaky tests. Do not use setTimeout in tests. Instead, await the condition to be met. You are not testing the TIME PASSING, you are testing the CONDITION.
- CRITICAL: Verify your test fails with USE_SYSTEM_BUN=1 bun test <file> and passes with bun bd test <file>. Your test is NOT VALID if it passes with USE_SYSTEM_BUN=1.
Code Architecture
Language Structure
- Zig code (src/*.zig): Core runtime, JavaScript bindings, package manager
- C++ code (src/bun.js/bindings/*.cpp): JavaScriptCore bindings, Web APIs
- TypeScript (src/js/): Built-in JavaScript modules with special syntax (see JavaScript Modules section)
- Generated code: Many files are auto-generated from .classes.ts and other sources. Bun will automatically rebuild these files when you make changes to them.
Core Source Organization
#### Runtime Core (src/)
- bun.zig - Main entry point
- cli.zig - CLI command orchestration
- js_parser.zig, js_lexer.zig, js_printer.zig - JavaScript parsing/printing
- transpiler.zig - Wrapper around js_parser with sourcemap support
- resolver/ - Module resolution system
- allocators/ - Custom memory allocators for performance
#### JavaScript Runtime (src/bun.js/)
- bindings/ - C++ JavaScriptCore bindings
- Generated classes from .classes.ts files
- Manual bindings for complex APIs
- api/ - Bun-specific APIs
- server.zig - HTTP server implementation
- FFI.zig - Foreign Function Interface
- crypto.zig - Cryptographic operations
- glob.zig - File pattern matching
- node/ - Node.js compatibility layer
- Module implementations (fs, path, crypto, etc.)
- Process and Buffer APIs
- webcore/ - Web API implementations
- fetch.zig - Fetch API
- streams.zig - Web Streams
- Blob.zig, Response.zig, Request.zig
- event_loop/ - Event loop and task management
#### Build Tools & Package Manager
- src/bundler/ - JavaScript bundler
- Advanced tree-shaking
- CSS processing
- HTML handling
- src/install/ - Package manager
- lockfile/ - Lockfile handling
- npm.zig - npm registry client
- lifecycle_script_runner.zig - Package scripts
#### Other Key Components
- src/shell/ - Cross-platform shell implementation
- src/css/ - CSS parser and processor
- src/http/ - HTTP client implementation
- websocket_client/ - WebSocket client (including deflate support)
- src/sql/ - SQL database integrations
- src/bake/ - Server-side rendering framework
#### Vendored Dependencies (vendor/)
Third-party C/C++ libraries are vendored locally and can be read from disk (these are not git submodules):
- vendor/boringssl/ - BoringSSL (TLS/crypto)
- vendor/brotli/ - Brotli compression
- vendor/cares/ - c-ares (async DNS)
- vendor/hdrhistogram/ - HdrHistogram (latency tracking)
- vendor/highway/ - Google Highway (SIMD)
- vendor/libarchive/ - libarchive (tar/zip)
- vendor/libdeflate/ - libdeflate (fast deflate)
- vendor/libuv/ - libuv (Windows event loop)
- vendor/lolhtml/ - lol-html (HTML rewriter)
- vendor/lshpack/ - ls-hpack (HTTP/2 HPACK)
- vendor/mimalloc/ - mimalloc (memory allocator)
- vendor/nodejs/ - Node.js headers (compatibility)
- vendor/picohttpparser/ - PicoHTTPParser (HTTP parsing)
- vendor/tinycc/ - TinyCC (FFI JIT compiler, fork: oven-sh/tinycc)
- vendor/WebKit/ - WebKit/JavaScriptCore (JS engine)
- vendor/zig/ - Zig compiler/stdlib
- vendor/zlib/ - zlib (compression, cloudflare fork)
- vendor/zstd/ - Zstandard (compression)
Build configuration for these is in scripts/build/deps/*.ts.
JavaScript Class Implementation (C++)
When implementing JavaScript classes in C++:
1. Create three classes if there's a public constructor:
- class Foo : public JSC::JSDestructibleObject (if has C++ fields)
- class FooPrototype : public JSC::JSNonFinalObject
- class FooConstructor : public JSC::InternalFunction
2. Define properties using HashTableValue arrays
3. Add iso subspaces for classes with C++ fields
4. Cache structures in ZigGlobalObject
Code Generation
Code generation happens automatically as part of the build process. The main scripts are:
- src/codegen/generate-classes.ts - Generates Zig & C++ bindings from *.classes.ts files
- src/codegen/generate-jssink.ts - Generates stream-related classes
- src/codegen/bundle-modules.ts - Bundles built-in modules like node:fs
- src/codegen/bundle-functions.ts - Bundles global functions like ReadableStream
In development, bundled modules can be reloaded without rebuilding Zig by running bun run build.
JavaScript Modules (src/js/)
Built-in JavaScript modules use special syntax and are organized as:
- node/ - Node.js compatibility modules (node:fs, node:path, etc.)
- bun/ - Bun-specific modules (bun:ffi, bun:sqlite, etc.)
- thirdparty/ - NPM modules we replace (like ws)
- internal/ - Internal modules not exposed to users
- builtins/ - Core JavaScript builtins (streams, console, etc.)
Code Review Self-Check
- Before writing code that makes a non-obvious choice, pre-emptively ask "why this and not the alternative?" If you can't answer, research until you can — don't write first and justify later.
- Don't take a bug report's suggested fix at face value; verify it's the right layer.
- If neighboring code does something differently than you're about to, find out _why_ before deviating — its choices are often load-bearing, not stylistic.
Important Development Notes
1. Never use bun test or bun <file> directly - always use bun bd test or bun bd <command>. bun bd compiles & runs the debug build.
2. All changes must be tested - if you're not testing your changes, you're not done.
3. Get your tests to pass. If you didn't run the tests, your code does not work.
4. Follow existing code style - check neighboring files for patterns
5. Create tests in the right folder in test/ and the test must end in .test.ts or .test.tsx
6. Use absolute paths - Always use absolute paths in file operations
7. Avoid shell commands - Don't use find or grep in tests; use Bun's Glob and built-in tools
8. Memory management - In Zig code, be careful with allocators and use defer for cleanup
9. Cross-platform - Run bun run zig:check-all to compile the Zig code on all platforms when making platform-specific changes
10. Debug builds - Use BUN_DEBUG_QUIET_LOGS=1 to disable debug logging, or BUN_DEBUG_<scopeName>=1 to enable specific Output.scoped(.${scopeName}, .visible)s
11. Be humble & honest - NEVER overstate what you got done or what actually works in commits, PRs or in messages to the user.
12. Branch names must start with claude/ - This is a requirement for the CI to work.
ONLY push up changes after running bun bd test <file> and ensuring your tests pass.
Debugging CI Failures
Requires the BuildKite CLI (brew install buildkite/buildkite/bk) and a read-scoped token in BUILDKITE_API_TOKEN. The repo's .bk.yaml sets the org/pipeline so -p bun is not needed.
Show rendered test-failure output for the current branch's latest build,
tagged [new] vs [also on main]
bun run ci:errors
bun run ci:errors '#26173' # or a PR number / URL / branch / build numberOne-screen progress summary (job counts, failed jobs, failing tests so far)
bun run ci:statusSave full logs for every failed job to ./tmp/ci-<build>/
bun run ci:logsJust the build number, for composing with raw bk
bun run ci:find
bk job log <job-uuid> -b $(bun run ci:find)Watch the current branch's build until it finishes
bun run ci:watchFor anything else, use bk directly — bk build list, bk api, bk artifacts, etc.
If output from these commands looks wrong — mis-parsed annotation HTML, confusing wording, a field BuildKite changed shape on — fix scripts/find-build.ts directly rather than working around it. It's a thin presenter over bk; keep it accurate.
Reading PR Feedback
gh pr view --comments is fine for a quick look at the Conversation tab, but it has a footgun worth knowing about: it only returns issue-stream comments and silently omits review summaries and line-level review comments. If a reviewer leaves an inline comment on a specific file line, it will not show up — no error, no hint that anything is missing.
When you want the complete picture — especially when responding to a review or checking whether anyone requested changes — use bun run pr:comments. It fetches all three GitHub endpoints (/issues/N/comments, /pulls/N/reviews, /pulls/N/comments) and prints them in one chronological listing, each labelled with its actual type (issue comment, review verdict, line comment, reply, suggestion block).
bun run pr:comments # current branch's PR — XML, resolved threads hidden
bun run pr:comments 28838 # by PR number
bun run pr:comments '#28838' # also works
bun run pr:comments https://github.com/oven-sh/bun/pull/28838
bun run pr:comments --include-resolved # also show threads already marked resolvedMachine-readable output for jq pipelines — one object per entry with
{ when, user, tag, state?, suggestion?, location?, body, url?, resolved?, outdated? }.
Resolved threads and bot noise (robobun's CI status comment, CodeRabbit
body-level summaries) are filtered out; --include-resolved restores the former.
bun run pr:comments --json | jq '.[] | select(.user == "Jarred-Sumner")'README.md
<p align="center">
<a href="https://bun.com"><img src="https://github.com/user-attachments/assets/50282090-adfd-4ddb-9e27-c30753c6b161" alt="Logo" height=170></a>
</p>
<h1 align="center">Bun</h1>
<p align="center">
<a href="https://bun.com/discord" target="_blank"><img height=20 src="https://img.shields.io/discord/876711213126520882" /></a>
<img src="https://img.shields.io/github/stars/oven-sh/bun" alt="stars">
<a href="https://twitter.com/jarredsumner/status/1542824445810642946"><img src="https://img.shields.io/static/v1?label=speed&message=fast&color=success" alt="Bun speed" /></a>
</p>
<div align="center">
<a href="https://bun.com/docs">Documentation</a>
<span> • </span>
<a href="https://discord.com/invite/CXdq2DP29u">Discord</a>
<span> • </span>
<a href="https://github.com/oven-sh/bun/issues/new">Issues</a>
<span> • </span>
<a href="https://github.com/oven-sh/bun/issues/159">Roadmap</a>
<br />
</div>
Read the docs →
What is Bun?
Bun is an all-in-one toolkit for JavaScript and TypeScript apps. It ships as a single executable called bun.
At its core is the _Bun runtime_, a fast JavaScript runtime designed as a drop-in replacement for Node.js. It's written in Zig and powered by JavaScriptCore under the hood, dramatically reducing startup times and memory usage.
bun run index.tsx # TS and JSX supported out-of-the-boxThe bun command-line tool also implements a test runner, script runner, and Node.js-compatible package manager. Instead of 1,000 node_modules for development, you only need bun. Bun's built-in tools are significantly faster than existing options and usable in existing Node.js projects with little to no changes.
bun test # run tests
bun run start # run the start script in package.json
bun install <pkg> # install a package
bunx cowsay 'Hello, world!' # execute a packageInstall
Bun supports Linux (x64 & arm64), macOS (x64 & Apple Silicon), and Windows (x64 & arm64).
Linux users — Kernel version 5.6 or higher is strongly recommended, but the minimum is 5.1.
x64 users — if you see "illegal instruction" or similar errors, check our CPU requirements
with install script (recommended)
curl -fsSL https://bun.com/install | bashon windows
powershell -c "irm bun.sh/install.ps1 | iex"with npm
npm install -g bunwith Homebrew
brew tap oven-sh/bun
brew install bunwith Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bunUpgrade
To upgrade to the latest version of Bun, run:
bun upgradeBun automatically releases a canary build on every commit to main. To upgrade to the latest canary build, run:
bun upgrade --canaryQuick links
- Intro
- What is Bun?
- Installation
- Quickstart
- TypeScript
- Templating
- bun init
- bun create
- CLI
- bun upgrade
- Runtime
- bun run
- File types (Loaders)
- TypeScript
- JSX
- Environment variables
- Bun APIs
- Web APIs
- Node.js compatibility
- Single-file executable
- Plugins
- Watch mode / Hot Reloading
- Module resolution
- Auto-install
- bunfig.toml
- Debugger
- $ Shell
- Package manager
- bun install
- bun add
- bun remove
- bun update
- bun link
- bun unlink
- bun pm
- bun outdated
- bun publish
- bun patch
- bun patch-commit
- Global cache
- Workspaces
- Lifecycle scripts
- Filter
- Lockfile
- Scopes and registries
- Overrides and resolutions
- .npmrc
- Bundler
- Bun.build
- Loaders
- Plugins
- Macros
- vs esbuild
- Single-file executable
- CSS
- HTML
- Hot Module Replacement (HMR)
- Full-stack with HTML imports
- Test runner
- bun test
- Writing tests
- Watch mode
- Lifecycle hooks
- Mocks
- Snapshots
- Dates and times
- DOM testing
- Code coverage
- Configuration
- Discovery
- Reporters
- Runtime Behavior
- Package runner
- bunx
- API
- HTTP server (Bun.serve)
- WebSockets
- Workers
- Binary data
- Streams
- File I/O (Bun.file)
- import.meta
- SQLite (bun:sqlite)
- PostgreSQL (Bun.sql)
- Redis (Bun.redis)
- S3 Client (Bun.s3)
- FileSystemRouter
- TCP sockets
- UDP sockets
- Globals
- $ Shell
- Child processes (spawn)
- Transpiler (Bun.Transpiler)
- Hashing
- Colors (Bun.color)
- Console
- FFI (bun:ffi)
- C Compiler (bun:ffi cc)
- HTMLRewriter
- Testing (bun:test)
- Cookies (Bun.Cookie)
- Utils
- Node-API
- Glob (Bun.Glob)
- Semver (Bun.semver)
- DNS
- fetch API extensions
Guides
- Binary
- Convert a Blob to a string
- Convert a Buffer to a blob
- Convert a Blob to a DataView
- Convert a Buffer to a string
- Convert a Blob to a ReadableStream
- Convert a Blob to a Uint8Array
- Convert a DataView to a string
- Convert a Uint8Array to a Blob
- Convert a Blob to an ArrayBuffer
- Convert an ArrayBuffer to a Blob
- Convert a Buffer to a Uint8Array
- Convert a Uint8Array to a Buffer
- Convert a Uint8Array to a string
- Convert a Buffer to an ArrayBuffer
- Convert an ArrayBuffer to a Buffer
- Convert an ArrayBuffer to a string
- Convert a Uint8Array to a DataView
- Convert a Buffer to a ReadableStream
- Convert a Uint8Array to an ArrayBuffer
- Convert an ArrayBuffer to a Uint8Array
- Convert an ArrayBuffer to an array of numbers
- Convert a Uint8Array to a ReadableStream
- Ecosystem
- Use React and JSX
- Use Gel with Bun
- Use Prisma with Bun
- Add Sentry to a Bun app
- Create a Discord bot
- Run Bun as a daemon with PM2
- Use Drizzle ORM with Bun
- Build an app with Nuxt and Bun
- Build an app with Qwik and Bun
- Build an app with Astro and Bun
- Build an app with Remix and Bun
- Build a frontend using Vite and Bun
- Build an app with Next.js and Bun
- Run Bun as a daemon with systemd
- Deploy a Bun application on Render
- Build an HTTP server using Hono and Bun
- Build an app with SvelteKit and Bun
- Build an app with SolidStart and Bun
- Build an HTTP server using Elysia and Bun
- Build an HTTP server using StricJS and Bun
- Containerize a Bun application with Docker
- Build an HTTP server using Express and Bun
- Use Neon Postgres through Drizzle ORM
- Server-side render (SSR) a React component
- Read and write data to MongoDB using Mongoose and Bun
- Use Neon's Serverless Postgres with Bun
- HTMLRewriter
- Extract links from a webpage using HTMLRewriter
- Extract social share images and Open Graph tags
- HTTP
- Hot reload an HTTP server
- Common HTTP server usage
- Write a simple HTTP server
- Configure TLS on an HTTP server
- Send an HTTP request using fetch
- Proxy HTTP requests using fetch()
- Start a cluster of HTTP servers
- Stream a file as an HTTP Response
- fetch with unix domain sockets in Bun
- Upload files via HTTP using FormData
- Streaming HTTP Server with Async Iterators
- Streaming HTTP Server with Node.js Streams
- Install
- Add a dependency
- Add a Git dependency
- Add a peer dependency
- Add a trusted dependency
- Add a development dependency
- Add a tarball dependency
- Add an optional dependency
- Generate a yarn-compatible lockfile
- Configuring a monorepo using workspaces
- Install a package under a different name
- Install dependencies with Bun in GitHub Actions
- Using bun install with Artifactory
- Configure git to diff Bun's lockb lockfile
- Override the default npm registry for bun install
- Using bun install with an Azure Artifacts npm registry
- Migrate from npm install to bun install
- Configure a private registry for an organization scope with bun install
- Process
- Read from stdin
- Listen for CTRL+C
- Spawn a child process
- Listen to OS signals
- Parse command-line arguments
- Read stderr from a child process
- Read stdout from a child process
- Get the process uptime in nanoseconds
- Spawn a child process and communicate using IPC
- Read file
- Read a JSON file
- Check if a file exists
- Read a file as a string
- Read a file to a Buffer
- Get the MIME type of a file
- Watch a directory for changes
- Read a file as a ReadableStream
- Read a file to a Uint8Array
- Read a file to an ArrayBuffer
- Runtime
- Delete files
- Run a Shell Command
- Import a JSON file
- Import a TOML file
- Set a time zone in Bun
- Set environment variables
- Re-map import paths
- Delete directories
- Read environment variables
- Import a HTML file as text
- Install and run Bun in GitHub Actions
- Debugging Bun with the web debugger
- Install TypeScript declarations for Bun
- Debugging Bun with the VS Code extension
- Inspect memory usage using V8 heap snapshots
- Define and replace static globals & constants
- Codesign a single-file JavaScript executable on macOS
- Streams
- Convert a ReadableStream to JSON
- Convert a ReadableStream to a Blob
- Convert a ReadableStream to a Buffer
- Convert a ReadableStream to a string
- Convert a ReadableStream to a Uint8Array
- Convert a ReadableStream to an array of chunks
- Convert a Node.js Readable to JSON
- Convert a ReadableStream to an ArrayBuffer
- Convert a Node.js Readable to a Blob
- Convert a Node.js Readable to a string
- Convert a Node.js Readable to an Uint8Array
- Convert a Node.js Readable to an ArrayBuffer
- Test
- Spy on methods in bun test
- Bail early with the Bun test runner
- Mock functions in bun test
- Run tests in watch mode with Bun
- Use snapshot testing in bun test
- Skip tests with the Bun test runner
- Using Testing Library with Bun
- Update snapshots in bun test
- Run your tests with the Bun test runner
- Set the system time in Bun's test runner
- Set a per-test timeout with the Bun test runner
- Migrate from Jest to Bun's test runner
- Write browser DOM tests with Bun and happy-dom
- Mark a test as a "todo" with the Bun test runner
- Re-run tests multiple times with the Bun test runner
- Generate code coverage reports with the Bun test runner
- import, require, and test Svelte components with bun test
- Set a code coverage threshold with the Bun test runner
- Util
- Generate a UUID
- Hash a password
- Escape an HTML string
- Get the current Bun version
- Encode and decode base64 strings
- Compress and decompress data with gzip
- Sleep for a fixed number of milliseconds
- Detect when code is executed with Bun
- Check if two objects are deeply equal
- Compress and decompress data with DEFLATE
- Get the absolute path to the current entrypoint
- Get the directory of the current file
- Check if the current file is the entrypoint
- Get the file name of the current file
- Convert a file URL to an absolute path
- Convert an absolute path to a file URL
- Get the absolute path of the current file
- Get the path to an executable bin file
- WebSocket
- Build a publish-subscribe WebSocket server
- Build a simple WebSocket server
- Enable compression for WebSocket messages
- Set per-socket contextual data on a WebSocket
- Write file
- Delete a file
- Write to stdout
- Write a file to stdout
- Write a Blob to a file
- Write a string to a file
- Append content to a file
- Write a file incrementally
- Write a Response to a file
- Copy a file to another location
- Write a ReadableStream to a file
Contributing
Refer to the Project > Contributing guide to start contributing to Bun.
License
Refer to the Project > License page for information about Bun's licensing.