skills/bun-runtime-web-apis/SKILL.md
Web-standard APIs supported by Bun for server-side JavaScript
npx skillsauth add jarle/bun-skills Bun Web APIsInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Web-standard APIs supported by Bun for server-side JavaScript
Some Web APIs aren't relevant in the context of a server-first runtime like Bun, such as the DOM API or History API. Many others, though, are broadly useful outside of the browser context; when possible, Bun implements these Web-standard APIs instead of introducing new APIs.
The following Web APIs are partially or completely supported.
| Category | APIs |
| --------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| HTTP | fetch, Response, Request, Headers, AbortController, AbortSignal |
| URLs | URL, URLSearchParams |
| Web Workers | Worker, self.postMessage, structuredClone, MessagePort, MessageChannel, BroadcastChannel |
| Streams | ReadableStream, WritableStream, TransformStream, ByteLengthQueuingStrategy, CountQueuingStrategy and associated classes |
| Blob | Blob |
| WebSockets | WebSocket |
| Encoding and decoding | atob, btoa, TextEncoder, TextDecoder |
| JSON | JSON |
| Timeouts | setTimeout, clearTimeout |
| Intervals | setInterval, clearInterval |
| Crypto | crypto, SubtleCrypto, CryptoKey |
| Debugging | console, performance |
| Microtasks | queueMicrotask |
| Errors | reportError |
| User interaction | alert, confirm, prompt (intended for interactive CLIs) |
| Realms | ShadowRealm |
| Events | EventTarget, Event, ErrorEvent, CloseEvent, MessageEvent |
development
Using TypeScript with Bun, including type definitions and compiler options
development
Learn how to write tests using Bun's Jest-compatible API with support for async tests, timeouts, and various test modifiers
testing
Learn how to use snapshot testing in Bun to save and compare output between test runs
testing
Learn about Bun test's runtime integration, environment variables, timeouts, and error handling