Skip to content

Node.js Compatibility

Pure implements the most common Node.js built-in modules. The goal is drop-in compatibility for the vast majority of npm packages. This page lists what is available, what is partial, and what is absent.

ModuleStatusNotes
node:fs / fs✅ FullSync and async, streams, watchers
node:path✅ Full
node:os✅ Full
node:crypto✅ FullIncluding crypto.subtle
node:buffer✅ FullBuffer.from, Buffer.alloc, etc.
node:stream✅ FullReadable, Writable, Transform, PassThrough, pipeline
node:stream/promises✅ Full
node:events✅ FullEventEmitter
node:net✅ FullTCP sockets, server, createConnection
node:http✅ Fullhttp.createServer, http.request, http.get
node:https✅ Full
node:http2⚠️ PartialClient support only; server push not implemented
node:url✅ Full
node:querystring✅ Full
node:zlib✅ Fullgzip, deflate, brotli
node:util✅ Fullpromisify, inspect, format, inherits, etc.
node:assert✅ Full
node:child_process✅ Fullspawn, exec, execFile, spawnSync, execSync
node:process✅ Fullenv, argv, exit, cwd, pid, signals, stdin/stdout/stderr
node:worker_threads✅ FullWorker, workerData, parentPort, MessageChannel
node:timers✅ Full
node:timers/promises✅ Full
node:readline✅ Full
node:string_decoder✅ Full
node:perf_hooks✅ Fullperformance.now(), PerformanceObserver
node:diagnostics_channel✅ Full
node:async_hooks⚠️ PartialAsyncLocalStorage supported; AsyncResource partial
node:inspector❌ Not supported
node:vm❌ Not supportedSee Not supported
node:repl❌ Not supported
node:v8⚠️ Partialserialize/deserialize supported; heap profiling not available
node:wasi❌ Not supported
node:sqlite❌ Not supportedUse better-sqlite3 or @electric-sql/pglite
node:domain❌ Not supportedDeprecated upstream

File watchers work on Linux and macOS. On macOS, fs.watch uses FSEvents. Watch events on paths inside a VFS directory are not supported (VFS is read-only and does not change at runtime).

fork() is not supported. Use spawn or exec. The shell: true option on spawn is supported.

The HTTP server is fully functional. The Agent class (keep-alive connection pooling) is supported. http.globalAgent and custom agents work as expected.

AsyncLocalStorage is the recommended API and is fully supported. AsyncResource is partially supported — runInAsyncScope works, but manual trigger tracking via AsyncResource.bind has edge cases with some callback patterns.

process.stdin works as a readable stream when piped. Interactive TTY mode (raw mode) is supported via readline.

Returns the path to the compiled binary, not a node or bun executable. Code that does child_process.spawn(process.execPath, ...) to start a sub-process works as expected — it spawns another instance of the same binary.

See the Bun-specific notes in Not supported for Bun APIs that do not apply to Pure binaries.