Something went wrong. Try again.
Interpreter for the i++ programming language
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930export interface WasmModule { default(): Promise<void>; parse(input: string): string; parse_raw?(input: string): string; reset_engine?(): void;}
let wasm: WasmModule | null = null;let loading: Promise<WasmModule> | null = null;
export function loadWasm(): Promise<WasmModule> { if (wasm) return Promise.resolve(wasm); if (loading) return loading;
loading = (async () => { // The wasm-bindgen artifacts live in /wasm/ (copied from web/static/wasm). // @ts-expect-error dynamic import of generated wasm-bindgen JS const mod: WasmModule = await import(/* @vite-ignore */ '/wasm/i_plus_plus.js'); await mod.default(); wasm = mod; return mod; })();
return loading;}
export function getWasm(): WasmModule | null { return wasm;}