nekomimi.pet / wisp-firehose-service
Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
Pull this image
docker pull atcr.io/nekomimi.pet/wisp-firehose-service:staging
Overview
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-box
The 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 package
Install
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 | bash
# on windows
powershell -c "irm bun.sh/install.ps1 | iex"
# with npm
npm install -g bun
# with Homebrew
brew tap oven-sh/bun
brew install bun
# with Docker
docker pull oven/bun
docker run --rm --init --ulimit memlock=-1:-1 oven/bun
Upgrade
To upgrade to the latest version of Bun, run:
bun upgrade
Bun automatically releases a canary build on every commit to main. To upgrade to the latest canary build, run:
bun upgrade --canary
Quick links
-
Intro
-
Templating
-
CLI
-
Runtime
-
Package manager
-
Bundler
-
Test runner
-
Package runner
-
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:fficc) - HTMLRewriter
- Testing (
bun:test) - Cookies (
Bun.Cookie) - Utils
- Node-API
- Glob (
Bun.Glob) - Semver (
Bun.semver) - DNS
- fetch API extensions
- HTTP server (
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
-
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 file
-
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
- Spy on methods in
-
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
-
Write 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.
Tags
sha256:a0f3a624e2734196da8a6421f8d5c7d1f4252b6254a9973b7ab778cf10ab7aac
sha256:03db5734db71e6569fa0f0ca016b58f194e7063abd3dd32e8f2cf258123a702a
sha256:42845255357b00bbf709f8a5b63946a5f8a6e68b93e77b94471de4f39c73a40b
docker pull atcr.io/nekomimi.pet/wisp-firehose-service:staging
Manifests
sha256:a0f3a624e2734196da8a6421f8d5c7d1f4252b6254a9973b7ab778cf10ab7aac
sha256:7119293607e7f8981f6f4a83b27c03480ae8ffd5f65cbf947567367ac23ed1e4
sha256:28e50749e5131ea986275738d69b4a250198d82a26d1dd1127c6f4bcace920a4
sha256:c33025daf7515c71cea9a35c36f236a553abb84477c647fd855affbcabc1f744
sha256:577d722e0ccf63e2acc7bee9449de8fdcae1e828d68c1999c897d905bfc6bee7
sha256:33428b870999ee9762a7f336553fd137fd2389621ec8ae3f17aea56d6c4f521f
sha256:fb364dc3aaaa3e5c761710825978a719117555ddb8360ed569456d9a134da02f
sha256:4e101f517248c9f09c1f54d9b8bc4b5eae01bd3f73cf1e2a36b6778f9b143e5c
sha256:1608923a6b07f26f22aad5818dacbb3a6408a0849bcb0cd1d20f0aad1ad5a2c1
sha256:98f11faab4475199b5f62e670a92312b555f922af3e45428aed4a1a8cd37f252
sha256:f47e2f319af615f25a5ea38bb52a99baf6d4d7c867703a6bb7add6c25beba5c9
sha256:44e0733a6019754a4cc1feec921a94258d3456dd774f9102764b421b7a5e512d
sha256:e20c17e1461a617eff0d7c15713bc5c75e043f37bfa1a74b70e7713a6035bcda
sha256:27c94c19e371ea28f49a4dcacc1389c5b2b17500ac1e97082a0e7ca85079fa2e
sha256:3cf4fc39d7eebaceac6080da1796d7e3d221daeeb5f24b1d06ab85959117d496
sha256:f27ff64612cbc9924607332a3c79fb4aa98c1314f6b7f8e68885ff0d3637963b
sha256:b8b54d5cd7d15a44cc049997746834c899cdb488f4b68ae588eae4efbf8ddf2f
sha256:42db1253cc5bb24f6944e0acecced0fa5d7404c32ad770ddb072b0e042a89a0b
sha256:b83456606e78dff812f66b01c16cfbbb0c0bf060acce33609c42b447898f9960
sha256:cbf8334e5eb275a46baeaac125b5e9928fcbd3e31433c2edb0be35478ebcdbe5
sha256:7311c0659f0d3f5f35e6c59f0196e8c46f827973a2fbae3202f40ea257039b8b
sha256:4358d0a070bdb949fd7a211cf778985d6220c0be2c30f156f37e77d586968454
sha256:bcca42a22e1ab14a69d18956d392de7b3fafeec2ecf3d9f7f74f0e709988fae9
sha256:3811ba6e33b94eb9c8479d0fd6545a8fb3e7c4f993f6e96eafbca08667bacb99
sha256:0ebcf88234866dababd4226666d4df3cb5afbf1d44684ac1aa7558ce247e2281
sha256:40e31c5c13cecb9b018488192fcbb7adfa7ea9d6528b56e4c640619072e0fd86
sha256:7482ba0f2d969307aa2dfa317b3fa517393f00c53fca71e6238256db0127b86f
sha256:f7274a6a57bd91538006a6c054fb48ce624f675ec691961e12275cdb232f1a15
sha256:bdae689ccdc641350cee0d64ccbaefd4cf3e7185794de144c344a0520c9d77bb
sha256:4fea724435786d2b5e457b42996753afdedfa3ea44ff4cbfd60b23f9cf6992ec
sha256:eb08b3fe6a7242fd0b50067e02f80a4332c91512dad1fadb258b43449490f0de
sha256:c327a23c6e27ed61effeb4a9bb7b8080525d6da1faee3c681b6d08fca05fdba5
sha256:df333836521d89ac120b0a6ab4a0b3f90453184ac59672cd941c182303df47bb
sha256:ad2214076b75e9ec85ab7c7b19e2f8aa7cbed3a589ba6d152515cb93ca80ed55
sha256:b45b6cec90a0197ef93b49f565c60a8d06a37661aca5993a32920474eed2b8b9
sha256:f76151d33f091254a475995fe0bced86365abf8e4720d01104d23bbdf76861e9
sha256:1a4edcd0ea75bb763f850f8509b60fea7874d68cd1a455f6c72aae4e74675cd1
sha256:6c0d7a77794b06e94005d7c38f6dece75004565866091461c745576f8ffb15bf
sha256:b05f998740e125f8af8f29eaafa9a5a3f7fa4e1d9fce291ecc5b2abf82c82a1b
sha256:38d9f139170d5c62600320698749e334a6e6e6edad759e6daf1e19552c39c0c0
sha256:18db328639330d2476f07b05dcc206341161452373a313235f942487c71ff99d
sha256:a3f34e5a72c0a8fa18e7744c5c89e598df2876f1ac44288a007f2a3fce60c25e
sha256:ec0d704c09807607ae3e494418888c3c11c3bd99ac54b475d507654ea0fd0602
sha256:a1d2e8c7a93ef464b5e56d8c51ecb79fd75a4f4d917bc8acb6ff50182f95d41d
sha256:5ebf3526dd3d5a6ffd63f00274f04c83508c3b5240d66bd30aa8cd932df8a5ed
sha256:1af28c167755ed8bfd644d99a5e4ea0f49731fb5dbf2c1035b8b3d06c7f5f01a
sha256:b82db026f7f9c5b853b82711eaec5ce3fbd31be43d696ad93dbae90659e9c397
sha256:75b077baf92a66e70fce644b77faf853f97e0e94421fa3cbc3010acfa2f5263b
sha256:744eeec52683013c828f337f60cdc9df83a7ed1b903ca45f3b5a02cf9eb215a4
sha256:3f090ed4a3a1e84ef6d73ec6d40e38ff6f89fe11a124b94fd484d5490e7719c3