Skip to main content
WASI.prototype.initialize - node__wasi.d.ts - Node documentation
method WASI.prototype.initialize

Usage in Deno

```typescript import { WASI } from "node:node__wasi.d.ts"; ```
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`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/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