Skip to content

Commit dd01927

Browse files
committed
examples : add HEAPU8 to exported runtime methods
This commit adds `HEAPU8` to the list of exported methods. The motivation for this commit is that currently this is causing an error on Window systems where HEAPU8 in undefined, which results in the following error message in the web console: ```console main.js:1 Uncaught TypeError: Cannot read properties of undefined (reading 'buffer') at __emval_get_property (main.js:1:1363125) at 003a453a:0xc4a47 at 003a453a:0xc51cd at Object.full_default (eval at craftInvokerFunction (main.js:1:1347011), <anonymous>:9:10) at whisper.cpp/:647:42 ``` Resolves: #3059
1 parent f0d2bfb commit dd01927

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/whisper.wasm/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
3636
-s MAXIMUM_MEMORY=2000MB \
3737
-s ALLOW_MEMORY_GROWTH=1 \
3838
-s FORCE_FILESYSTEM=1 \
39-
-s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap']\" \
39+
-s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap', 'HEAPU8']\" \
4040
${EXTRA_FLAGS} \
4141
")
4242

0 commit comments

Comments
 (0)