Initialize the library using WebAssembly instance exports.
Use this function to asynchronously initialize the library. This function is a simple setter that doesn't involve WebAssembly compilation.
import { IMPORT_OBJECT, initWithExports } from 'corevm-codec/loader'import codeURL from 'corevm-codec/code.wasm?url' // Vite.const result = await WebAssembly.instantiateStreaming(fetch(codeURL), IMPORT_OBJECT)initWithExports(result.instance.exports) Copy
import { IMPORT_OBJECT, initWithExports } from 'corevm-codec/loader'import codeURL from 'corevm-codec/code.wasm?url' // Vite.const result = await WebAssembly.instantiateStreaming(fetch(codeURL), IMPORT_OBJECT)initWithExports(result.instance.exports)
Initialize the library using WebAssembly instance exports.
Use this function to asynchronously initialize the library. This function is a simple setter that doesn't involve WebAssembly compilation.
Example