ChicoryWasiPreview1Builder
WASI Preview 1 host function installer.
Sets up WebAssembly host imports that provide WASI Preview 1 implementations.
Usage example:
// Prepare WASI host imports
val wasiImports: List<HostFunction> = ChicoryWasiPreview1Builder {
host = embedderHost
}.build()
val hostImports = ImportValues.builder().withFunctions(wasiImports).build()
// Instantiate the WebAssembly module
val instance = Instance
.builder(wasmModule)
.withImportValues(hostImports)
.withInitialize(true)
.withStart(false)
.build()
Content copied to clipboard
Properties
Functions
Link copied to clipboard
fun build(moduleName: String = WASI_SNAPSHOT_PREVIEW1_MODULE_NAME): List<@JvmSuppressWildcards HostFunction>
Link copied to clipboard
Sets the host object that provides access from the WebAssembly to external host resources.
Link copied to clipboard
Sets memory provider used for all operations. For multi-memory scenarios.