nodeRuntime
nodeRuntime(
config?):Runtime
Defined in: packages/runtime/src/platform/node.ts:70
Create a Runtime pre-wired for Node.js.
Parameters
Section titled “Parameters”config?
Section titled “config?”Optional NodeRuntimeConfig. capabilities on the
base RuntimeConfig can selectively override individual
platform methods (e.g. a mock fetch for tests that still
want the real importEsm).
Returns
Section titled “Returns”A Runtime bound to the current Node process.
Remarks
Section titled “Remarks”Uses createNodeCapabilities under the hood, which binds to
node:fs/promises.readFile, globalThis.fetch (undici, Node 18+),
import(dataUri) for ESM evaluation, and WebAssembly.compile. Reuse
a single runtime across many boots — it holds no per-boot state.
For browser hosts use browserRuntime; for tests use testRuntime.
Example
Section titled “Example”import { Unix, stdSystem } from '@fishnet/core'import { nodeRuntime } from '@fishnet/runtime'
const image = await Unix().use(stdSystem()).build()await using sys = await nodeRuntime().boot(image)await sys.boot()