Reference
Supported surface and deliberate limits
Module-by-module Node 22.18 compatibility table, supported APIs, and explicit browser-substrate boundaries.
What @inbrowser/node supports, how its browser adaptations work, and where it stops. Configurable bounds and defaults are listed in resource-policy.md, internal design in architecture.md, and trust boundaries in threat-model.md.
Supported runtime surface
- Kernel & POSIX VFS: Dedicated kernel Worker owning an in-memory POSIX volume (
memfs) overSharedArrayBufferandAtomics, synchronous cross-process file visibility, per-process file descriptors, owner-bit permission checks (chmod,access,EACCES),fs/fs/promises(readFile,writeFile,readdir,opendir,cp,glob,watch,watchFile,mkdtemp,truncate,link,symlink,readv/writev,openAsBlob,createReadStream,createWriteStream), snapshots, IndexedDB snapshot/package-cache persistence, and workspace checkpoints. - Modules (CJS & ESM): Node
22.18exports/importspackage resolution, CommonJS caching and circular dependencies, process-scoped ES module graphs served by the Service Worker with live bindings, top-levelawait, CJS-to-ESM dynamicimport(), and named CJS export detection viacjs-module-lexer. - Processes, shell & threads: Independently terminable guest Workers (
spawn,forkwith JSON and advanced structured-clone IPC,execFile/exec), scoped POSIX-stylesh -c(quotes, escapes, env assignments,&&/||, pipelines, redirections, executable bit checks), and file-backedworker_threads(Worker,MessageChannel,BroadcastChannel,SharedArrayBuffertransfer,workerData,environmentData). - HTTP, preview & WebSockets:
node:http/node:httpsservers with bidirectional streaming bodies, backpressure windows (preview.requestWindowBytes/preview.responseWindowBytes), SSE, WebSocketupgraderelay, prefix-mode and per-origin preview routing (BootOptions.preview.origin) with in-memory RFC 6265 cookie jar, andPreviewOptions.clientScript+onPreviewClientMessagePortchannels. - Outbound HTTP: Socket-agent mode plus
httpAgentMode: 'fetch'supportingGET,HEAD,POST,PUT,PATCH,DELETE, andOPTIONS, outbound request bodies (up toresources.http.clientBodyBytes, default8 MiB),AbortSignal,Agentpooling,httpOmitHeaders, andhttpAllowedHosts/httpBlockedHosts/httpEgresshost-port policies (EACCES). - Streams & Web Streams:
node:stream(Readable,Writable,Duplex,Transform,PassThrough,duplexPair,pipeline,finished), full Web Streams adapters (Readable.toWeb/fromWeb,Writable.toWeb/fromWeb,Duplex.toWeb/fromWeb,ReadableStream.from,Writable.prototype[Symbol.asyncDispose]),stream/web,stream/promises, andstream/consumers. - Compression (
node:zlib):Gzip,Gunzip,Deflate,Inflate,DeflateRaw,InflateRaw,Unzip, andcrc32overpako, plus lazy Worker WebAssemblyBrotliCompress/BrotliDecompress(wasm-brotli) andZstdCompress/ZstdDecompress(@oneidentity/zstd-js) with stream, callback, and*SyncAPIs (zero cold-boot WASM compilation until first codec call). - SQLite (
node:sqlite): Lazy Worker WebAssemblyDatabaseSyncandStatementSync(node-sqlite3-wasm) supporting:memory:and VFS-backed database files, prepared statements, transactions, customfunction()/aggregate()UDFs, sessions/changesets, andbackup(). - Crypto, V8 &
node:test:node:crypto(WebCryptosubtle, SHA/MD5/RIPEMD digests, HMAC, AES/ChaCha ciphers, async RSA/EC/Ed25519sign/verify/generateKeyPair,scrypt,pbkdf2,hkdf, and constant-time WASMtimingSafeEqual),node:v8(Serializer,Deserializer,DefaultSerializer,DefaultDeserializer,serialize,deserialize, and advisorygetHeapStatistics), andnode:test(describe,it,test, lifecycle hooks, subtests,mockfunctions/timers, andtap/spec/dot/junitreporters). - Experimental async context & 3-origin sandboxing: Opt-in
asyncContext: 'experimental'(AsyncLocalStorageandAsyncResourceacrossasync/await, timers, and HTTP servers) and 3-originSandboxContainer+installSandboxHostisolation.
Deliberate limits and divergences
- Trusted guest execution within a Worker realm: Guest code shares its dedicated Worker global scope with guest-side shims and is not hardened against hostile code execution. In default same-origin prefix mode, preview documents share the host origin; use
SandboxContainer+BootOptions.preview.originwhen isolating the host application’s origin, cookies, DOM, and storage (threat-model.md). - ESM &
vmboundaries: Import attributes / JSON modules,data:module URLs, source/defer module imports, and synchronousrequire()of ESM fail explicitly (ENOSYS/ Node module errors).node:vmcontexts (createContext,runInContext,Script,compileFunction) use a same-realm approximation rather than separate V8 realms; see architecture.md. - Syscall & VFS bounds: Individual JSON syscall payloads are capped at
1 MiB(descriptor reads/writes stream in64 KiBchunks up to32 MiBdefault,64 MiBmax). Default volume quotas enforce1 GiBtotal bytes (filesystem.maxTotalBytes),200,000inodes (filesystem.maxInodes),4,096open descriptors (filesystem.maxOpenDescriptors), and64live guest processes/threads (child.maxProcesses). File permissions evaluate owner bits only (umaskis0). - Stream & codec nuances: When
_finalfails synchronously insideend(cb),readable-streaminvokes theendcallback before'error'.zlibruns on the guest Worker thread rather than a background native thread pool;Deflate.prototype.params()throwsENOSYS; in 32-bit WASMBrotliCompresssupportsBROTLI_PARAM_LGWINup to27(BrotliDecompressdecodes up to30), andZstdCompressclampsZSTD_c_windowLog31to30single-threaded. - Networking & TLS: Preview HTTP and Fetch-mode outbound HTTP operate at the HTTP message/stream layer rather than raw TCP/TLS sockets;
node:tlssocket connections,node:http2sessions,node:dgram,node:dnswire lookups, and native C++ addons (.node/ N-API) reject explicitly withENOSYS. - Advisory memory reporting & scheduling:
v8.getHeapStatistics(),process.memoryUsage(), andos.freemem()report coarsened, page-wide browser heap figures when exposed by Chromium (throwingENOSYSwhen unavailable). Event-loop scheduling uses browser Worker task/microtask queues rather than libuv phases, and CPU/heap per Worker are bounded bykill()/teardown()rather than preemptive OS quotas. - Per-origin preview cookies & compression: In origin mode, cookies live in an in-memory per-container/per-origin runtime jar (not persisted across container restarts),
SameSiteis judged by origin, and the preview worker decodesgzipand RFC 1950deflatebodies transparently while raw deflate bodies reject on read.