MemorySource
Types
Link copied to clipboard
class ExportedExternalMemory(val sourceContext: Context, val sourceMemoryIndex: Int = 0, val exportedName: String = "memory") : MemorySource
Shared memory from sourceContext with index sourceMemoryIndex will be installed in the module and exported as exportedMemoryName.
Link copied to clipboard
class ExportedMemory(val memoryName: String = "memory", val spec: MemorySpec = MemorySpec.Builder().build()) : MemorySource
The memory will be created in the module and exported as memoryName.
Link copied to clipboard
class ImportedMemory(val moduleName: String = "main", val memoryName: String = "memory", val spec: MemorySpec = MemorySpec.Builder()
.setMaxSize(WASM_MEMORY_32_MAX_PAGES)
.build()) : MemorySource
The memory is imported from the module moduleName, where it is exported as memoryName. The imported memory's limits are defined by the spec.