child_process, and all runtimes see the same files.
Command routing
When you callkernel.exec("node -e ..."), the kernel resolves node through the command registry to find which driver handles it. The last-mounted driver wins on conflicts.
| Command | Driver | Why |
|---|---|---|
sh, bash, cat, grep, echo, ls, find, … | wasmvm | Mounted first, no override |
node, npm, npx | node | Mounted second, overrides wasmvm stubs |
python, python3 | python | Mounted third, overrides wasmvm stubs |
child_process routing (Node → shell)
When Node code callschild_process.spawn() or execSync(), the bridge routes it through kernel.spawn(). The kernel resolves the command to the right driver.
Cross-runtime pipes
The shell pipe operator creates kernel pipes between processes, even across different runtimes.WasmVM → Node pipe
Node → WasmVM pipe
Programmatic pipe creation
For advanced use, create pipes manually via theKernelInterface:
Shared VFS
All runtimes read and write the same kernel VFS. Changes are immediately visible across runtimes.npm run scripts
npm readspackage.json, calls child_process.spawn('sh', ['-c', scriptCommand]), which routes through the kernel to WasmVM: