This commit is contained in:
2025-11-01 11:13:34 -07:00
parent 3dd397d60b
commit ccd4292ed2
25 changed files with 808 additions and 940 deletions

View File

@@ -47,10 +47,12 @@ export const initRhaiMode = (CodeMirror: any) => {
});
};
// Function to preload all WASM modules used by the application
export const loadAllWasm = async (): Promise<void> => {
try {
// Load Rhai CodeMirror WASM
await loadRhaiWasm();
// Load Script Runner WASM by creating and immediately terminating a worker
@@ -79,9 +81,9 @@ export const loadAllWasm = async (): Promise<void> => {
};
});
console.log("All WASM modules loaded successfully");
console.log("All WASM modules loaded successfully");
} catch (error) {
console.error("Failed to load WASM modules:", error);
console.error("Failed to load WASM modules:", error);
throw error;
}
};