Skip to content

Commit a1e9917

Browse files
committed
fix(wasm-utils): Add implementation for emscripten_memcpy_js
Emscripten expect the JS-host to provide this import since v3.1.46 and this PR: emscripten-core/emscripten#20144
1 parent 1fc58f6 commit a1e9917

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

libs/typescript/ts-utils/wasm-utils.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,9 @@ export async function loadWasm<Exports extends WebAssembly.Exports>({
8484
},
8585
emscripten_notify_memory_growth: (x: undefined) =>
8686
console.log('emscripten_notify_memory_growth'),
87+
emscripten_memcpy_js: (dest: any, src: any, num: any) => {
88+
HEAPU8.copyWithin(dest, src, src + num);
89+
},
8790
emscripten_memcpy_big: (dest: any, src: any, num: any) => {
8891
HEAPU8.copyWithin(dest, src, src + num);
8992
},

0 commit comments

Comments
 (0)