WasmInstance Class

An instance of a module (a module instance).

public abstract class WasmInstance

Properties

NameDescription
ExportsGets the exports of the instance, in the order of the exports of the module.

Exports

Gets the exports of the instance, in the order of the exports of the module.

public abstract IReadOnlyList<(string Name, WasmExtern Value)> Exports { get; }

Methods

NameDescription
GetExport(string)Returns the export of a name, or null.
GetFunction(string)Returns the exported function of a name, or null when there is no such export or it is not a function.
GetGlobal(string)Returns the exported global of a name, or null when there is no such export or it is not a global.
GetMemory(string)Returns the exported memory of a name, or null when there is no such export or it is not a memory.
GetTable(string)Returns the exported table of a name, or null when there is no such export or it is not a table.
GetTag(string)Returns the exported tag of a name, or null when there is no such export or it is not a tag.

GetExport(string)

WasmObjects.cs

Returns the export of a name, or null.

public WasmExtern? GetExport(string name)

Parameters

name string
The name of the export.

Returns

WasmExtern?

GetFunction(string)

WasmObjects.cs

Returns the exported function of a name, or null when there is no such export or it is not a function.

public WasmFunction? GetFunction(string name)

Parameters

name string

Returns

WasmFunction?

GetGlobal(string)

WasmObjects.cs

Returns the exported global of a name, or null when there is no such export or it is not a global.

public WasmGlobal? GetGlobal(string name)

Parameters

name string

Returns

WasmGlobal?

GetMemory(string)

WasmObjects.cs

Returns the exported memory of a name, or null when there is no such export or it is not a memory.

public WasmMemory? GetMemory(string name)

Parameters

name string

Returns

WasmMemory?

GetTable(string)

WasmObjects.cs

Returns the exported table of a name, or null when there is no such export or it is not a table.

public WasmTable? GetTable(string name)

Parameters

name string

Returns

WasmTable?

GetTag(string)

WasmObjects.cs

Returns the exported tag of a name, or null when there is no such export or it is not a tag.

public WasmTag? GetTag(string name)

Parameters

name string

Returns

WasmTag?