This commit is contained in:
2026-07-08 18:29:36 +08:00
parent ad51ced86c
commit 3af8ff9b80
1613 changed files with 701644 additions and 2 deletions
+18
View File
@@ -0,0 +1,18 @@
let wasm;
/**
* Gets the webassembly module provided in provideWasm.
*/
export const getWasm = () => {
if (!wasm) {
throw new Error('BLAKE3 webassembly not loaded. Please import the module via `blake3/browser` or `blake3/browser-async`');
}
return wasm;
};
/**
* Sets the webassembly module used for the browser build. This indirection is
* needed to provide compatibility between the "browser" and "browser-async" modes.
*/
export const provideWasm = (w) => {
wasm = w;
};
//# sourceMappingURL=wasm.js.map