Documentation
WebAssembly
Use the optional WASM helpers to fetch and compile trusted browser WebAssembly modules.
Load a module
The functions exported by a WASM file are decided by that file. Serve WASM with application/wasm.
import { WasmLoader } from "https://cdn.jsdelivr.net/npm/@aldane-dev-create/fyr@0.1.2/dist/fyr-wasm.esm.js";
const loader = new WasmLoader({ allowedOrigins: [location.origin] });
const module = await loader.load("math", "/wasm/math.wasm");
const instance = await WebAssembly.instantiate(module, {});Keep exploringSee framework examples →