WasmImports Class

The imports of an instantiation, by module and name (see WasmStore.Instantiate).

public sealed class WasmImports

Constructors

NameDescription
WasmImports()

WasmImports()

WasmObjects.cs
public WasmImports()

No documentation is available.

Methods

NameDescription
Define(string, WasmInstance)Defines the exports of an instance as the imports of a module.
Define(string, string, WasmExtern)Defines an import, or replaces its value.
Get(string, string)Returns the value of an import, or null.

Define overloads

Define(string, WasmInstance)

WasmObjects.cs

Defines the exports of an instance as the imports of a module.

public WasmImports Define(string module, WasmInstance instance)
Parameters
module string
The name of the module of the imports.
instance WasmInstance
The instance whose exports are defined.
Returns

WasmImports The imports.

Define(string, string, WasmExtern)

WasmObjects.cs

Defines an import, or replaces its value.

public WasmImports Define(string module, string name, WasmExtern value)
Parameters
module string
The name of the module of the import.
name string
The name of the import.
value WasmExtern
The value of the import.
Returns

WasmImports The imports.

Get(string, string)

WasmObjects.cs

Returns the value of an import, or null.

public WasmExtern? Get(string module, string name)

Parameters

module string
name string

Returns

WasmExtern?