Open-Source Wikis

/

Bun

/

Systems

/

Other subsystems

oven-sh/bun

Other subsystems

A grab-bag of smaller subsystems that exist in src/ but don't warrant a full page. Each has a directory pointer for when you need to dig in.

Subsystem Source One-liner
Source maps src/sourcemap/ VLQ encoder/decoder, source-map join helpers. Used by the printer, the bundler, the runtime, and the crash handler.
Allocators (data) src/collections/, src/StaticHashMap.zig, src/comptime_string_map.zig, src/identity_context.zig, src/linear_fifo.zig Hashmaps, fixed-size string maps computed at comptime, ring buffers.
Compression src/zlib.zig, src/brotli.zig, plus vendored vendor/zlib, vendor/libdeflate, vendor/brotli, vendor/zstd gzip/deflate/brotli/zstd encoders and decoders. Used by HTTP responses, Web Streams, Bun.gzipSync, etc.
Hashing src/sha.zig, src/wyhash.zig, src/hmac.zig SHA, wyhash (bun.hash), HMAC.
DNS src/dns.zig c-ares wrapper. Powers node:dns and fetch().
TLS src/boringssl.zig BoringSSL bindings.
Glob src/glob/, src/glob.zig Pattern matching — used by the shell, bun:test, Bun.Glob, the bundler, bun install workspace patterns.
Markdown src/md/ Markdown parser used by Bun.Markdown and a few tooling outputs.
YAML / TOML / INI src/bun.js/api/YAMLObject.zig, src/bun.js/api/TOMLObject.zig, src/ini.zig Read/write helpers.
NAPI / N-API src/napi/ Implementation of Node's N-API (*.node binary addons).
V8 C++ API shim vendor/nodejs/, src/bun.js/bindings/V8/ Compatibility shims so Node addons that link against V8 headers work under JSC.
Standalone module graph src/StandaloneModuleGraph.zig Format used by bun build --compile.
REPL line editor src/repl.zig Custom line editor (no readline dependency).
CLI completions src/cli/install_completions_command.zig, src/cli/add_completions.zig Shell completion logic.
Subprocess src/bun.js/api/bun/process.zig, src/shell/subproc.zig Cross-platform spawn (posix_spawn / CreateProcessW).
Cron src/bun.js/api/cron.zig, src/bun.js/api/cron_parser.zig The Bun.Cron API.
DNS resolver src/dns.zig and src/bun.js/node/dns.zig node:dns Promise + callback APIs.
HTML scanner src/HTMLScanner.zig, src/HTMLImportManifest.zig (in bundler) Parse HTML to extract scripts, styles, imports.
init src/init/ Templates and helpers for bun init.
PE/ELF/Mach-O patchers src/pe.zig, src/elf.zig, src/macho.zig Native binary surgery for bun build --compile.
Tracing src/tracy.zig, src/generated_perf_trace_events.zig Optional Tracy profiler integration.
Async helpers src/async/ bun.spawn async coordination primitives.
Watcher backends src/watcher/ Platform-specific file-system event sources.
VM internals src/vm/ Internal VM helpers shared across VirtualMachine callers.
base64 src/base64/, src/base64.zig SIMD base64 encode/decode.
Errno src/errno/ OS-specific errno enums.
IO threads src/io/ I/O scheduling primitives (file readers, threaded I/O).
Threading src/threading/, src/threading.zig Thread primitives, atomics, work pools.
Mocks/safety src/safety/, src/safety.zig Defensive helpers for debug builds (e.g. exception-scope checks).
Pointer helpers src/ptr/, src/ptr.zig Tagged-pointer wrappers.
Semver src/semver/, src/semver.zig Semantic-version range matching used by the package manager.
Webview src/bun.js/webview/ Embedded webview API (experimental).

When to extract a separate page

If you find yourself adding to a row above and notice the row growing past a paragraph, that's a sign to promote it to its own page in systems/ and link to it from the table.

Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.

Other subsystems – Bun wiki | Factory