Import
data class Import
Fields
| Name | Description |
|---|---|
val moduleName: String
|
|
val name: String
|
|
val descriptor: ImportDescriptor
|
Constructors
<init>
constructor(moduleName: String, name: String, descriptor: ImportDescriptor)
Represents an import for a WasmModule.
From the docs:
The imports component of a module defines a set of imports that are required for instantiation.
import ::= {module name, name name, desc importdesc}
importdesc ::= func typeidx
table tabletype
mem memtype
global globaltype
Each import is labeled by a two-level name space, consisting of a module name and a name for
an entity within that module. Importable definitions are functions, tables, memories, and
globals. Each import is specified by a descriptor with a respective type that a definition
provided during instantiation is required to match.
Every import defines an index in the respective index space. In each index space, the indices of imports go before the first index of any definition contained in the module itself.
Parameters
| Name | Description |
|---|---|
moduleName: String
|
|
name: String
|
|
descriptor: ImportDescriptor
|
Represents an import for a WasmModule.
From the docs:
The
importscomponent of a module defines a set of imports that are required for instantiation.Each import is labeled by a two-level name space, consisting of a
modulename and anamefor an entity within that module. Importable definitions are functions, tables, memories, and globals. Each import is specified by a descriptor with a respective type that a definition provided during instantiation is required to match.Every import defines an index in the respective index space. In each index space, the indices of imports go before the first index of any definition contained in the module itself.