Node built-ins
Built-ins import with or without the node: prefix. Labels are explained on the overview.
| Module | Status | Notes |
|---|---|---|
assert, assert/strict |
π‘ Partial | Common assertions (strictEqual, deepStrictEqual, rejects, β¦). |
async_hooks |
π‘ Partial | AsyncLocalStorage keeps its store only synchronously; itβs lost across await and timers. createHook does nothing. |
buffer |
β Works | Includes Blob, File, atob, btoa, isUtf8, isAscii. |
child_process |
βͺ Stub | No processes in the browser. |
cluster |
βͺ Stub | isPrimary is true; fork throws. |
console |
π‘ Partial | The global console. No Console class. |
constants |
βͺ Stub | Empty object. |
crypto |
π‘ Partial | createHash/createHmac (md5, ripemd160, sha1, sha2, sha3, blake2), hash, pbkdf2, scrypt (sync and callback), randomBytes, randomUUID, randomInt, getRandomValues, timingSafeEqual, webcrypto/subtle. No ciphers, sign/verify, KeyObject, generateKey*. |
dgram |
β Missing | |
diagnostics_channel |
βͺ Stub | Subscribers never receive messages. |
dns, dns/promises |
π‘ Partial | lookup resolves only localhost. |
domain |
β Missing | |
events |
β Works | EventEmitter, once, on, with AbortSignal. |
fs, fs/promises |
π‘ Partial | Sync, callback and promise APIs over the projectβs files: read/write/append, stat, readdir (with Dirent), mkdir, rm, rename, copyFile, cp, file descriptors, FileHandle, read/write streams. watch (also recursive) and watchFile fire on changes. No symlinks or hard links; chmod/chown do nothing; fs/promises watch never yields. |
http |
π‘ Partial | createServer().listen() serves the preview: streamed responses, cookies, WebSocket upgrade. http.request/http.get throw; use fetch. |
https |
π‘ Partial | Like http; no TLS. |
http2 |
βͺ Stub | |
inspector |
βͺ Stub | |
module |
π‘ Partial | builtinModules, isBuiltin. createRequire serves built-ins; package requires in ES modules work for string literals (see Toolchain). |
net |
βͺ Stub | isIP* works; no sockets. |
os |
π‘ Partial | Fixed values: Linux, x64, /home/user, /tmp. cpus() and networkInterfaces() are empty. |
path, path/posix |
β Works | POSIX only. path.win32 behaves like POSIX; path/win32 is missing. |
perf_hooks |
π‘ Partial | performance, PerformanceObserver. monitorEventLoopDelay reports zeros. |
process |
π‘ Partial | Reports Linux x64 and Node v24.3.0. env, cwd, chdir, nextTick, hrtime, memoryUsage, uptime. stdout/stderr go to the console. argv is ["bun", entry]; stdin never emits; exit and kill throw. |
punycode |
β Works | |
querystring |
β Works | |
readline, readline/promises |
βͺ Stub | |
repl |
β Missing | |
sqlite |
β Missing | Use bun:sqlite. |
stream, stream/promises |
β Works | Based on readable-stream. Readable.toWeb/fromWeb are basic. |
stream/web |
β Works | The browserβs web stream classes. |
string_decoder |
β Works | |
sys |
π‘ Partial | Same as util. |
test |
β Missing | Use bun:test. |
timers, timers/promises |
β Works | ref, unref, refresh, promise timers with AbortSignal. |
tls |
βͺ Stub | |
trace_events |
β Missing | |
tty |
π‘ Partial | isatty returns false. |
url |
β Works | URL, URLSearchParams, fileURLToPath, pathToFileURL, parse. |
util, util/types |
π‘ Partial | format, inspect, promisify, callbackify, inherits, deprecate, types, isDeepStrictEqual, parseEnv, styleText (no colors). No parseArgs, MIMEType; debuglog does nothing. |
v8 |
βͺ Stub | |
vm |
βͺ Stub | |
wasi |
β Missing | |
worker_threads |
π‘ Partial | isMainThread, MessageChannel, BroadcastChannel. new Worker() throws. |
zlib |
βͺ Stub | All functions throw. Web CompressionStream works. |