Skip to main content
WASI.prototype.initialize - wasi - Node documentation
method WASI.prototype.initialize

Usage in Deno

import { WASI } from "node:wasi";
WASI.prototype.initialize(instance: object): void

Attempt to initialize instance as a WASI reactor by invoking its _initialize() export, if it is present. If instance contains a _start() export, then an exception is thrown.

initialize() requires that instance exports a WebAssembly.Memory named memory. If instance does not have a memory export an exception is thrown.

If initialize() is called more than once, an exception is thrown.

Parameters

instance: object

Return Type

void