initialize

actual fun KioArch.initialize(module: Any)(source)

Registers the instantiated Emscripten WebAssembly module with KioArch on the Kotlin/JS target.

Parameters

module

the resolved Emscripten module instance returned by loadKioArchModule.

actual fun KioArch.initialize(module: Any)(source)

Registers the instantiated Emscripten WebAssembly module with KioArch on the Kotlin/WasmJs target and initializes the internal JS callback maps.

Parameters

module

the resolved Emscripten module instance returned by loadKioArchModule.

expect fun KioArch.initialize(module: Any)(source)

Registers the instantiated Emscripten WebAssembly module with KioArch.

Because WebAssembly compilation and instantiation are asynchronous in browsers and Node.js, this function must be called before any KioArch.createReader operation on JS and WasmJs targets.

loadKioArchModule().then { module ->
KioArch.initialize(module)
}

Parameters

module

the resolved Emscripten module instance returned by loadKioArchModule.

See also