Clone in a terminal:
main.js
examples/main-component/ - Update component code commit 8def408
let wasmModule;

async function loadWasm() {
    try {
        const wasmModule = await import("./main.js");
        await wasmModule.default("./main_bg.wasm");

        return wasmModule;
    } catch (error) {
        console.error("Failed to load WASM module:", error);
    }

    return null;
}

window.addEventListener("DOMContentLoaded", async () => {
    wasmModule = await loadWasm();
});

File history (2 commits)

cfe5d0c Johan Mattsson - johan.mattsson.m@gmail.com
Update component code
Update component code
06a68b2 Johan Mattsson - johan.mattsson.m@gmail.com
Try multi thread component ideas
Try multi thread component ideas

Contact

Email: johan.mattsson.m@gmail.com
Mastodon: typo.social/@birdfont
GitHub: johanmattssonm
LinkedIn: johan-mattsson-2ab324112