Export

Export

data class Export

Defines an export for a WasmModule.

From the docs:

The exports component of a module defines a set of exports that become accessible to the host environment once the module has been instantiated.


export     ::= {name name, desc exportdesc}
exportdesc ::= func funcidx
table tableidx
mem memidx
global globalidx

Each export is labeled by a unique name. Exportable definitions are functions, tables, memories, and globals, which are referenced through a respective descriptor.

Fields

Name Description
val name: String
val descriptor: ExportDescriptor<*>

Constructors

<init>

constructor(name: String, descriptor: ExportDescriptor<*>)

Defines an export for a WasmModule.

From the docs:

The exports component of a module defines a set of exports that become accessible to the host environment once the module has been instantiated.


export     ::= {name name, desc exportdesc}
exportdesc ::= func funcidx
table tableidx
mem memidx
global globalidx

Each export is labeled by a unique name. Exportable definitions are functions, tables, memories, and globals, which are referenced through a respective descriptor.

Parameters

Name Description
name: String
descriptor: ExportDescriptor<*>

Extensions

validate

fun Export.validate(context: Module): Module

Validates the Export node.

Receiver

Name Description
Export

Parameters

Name Description
context: Module

ReturnValue

Name Description
Module