danbev commited on
Commit
df2c5e7
·
unverified ·
1 Parent(s): 87f0773

stream.wasm : add HEAPU8 to exported runtime methods (#3130)

Browse files

* stream.wasm : add HEAPU8 to exported runtime methods

This commit adds HEAPU8 to the list of exported methods for stream.wasm.

The motivation for this is that without it HEAPUD8 will be undefined
and when its 'buffer' attribute is accessed this will cause error as
reported in the referenced issue.

Note that to test this make sure that the web browsers caches is cleared
first.

Resolves: https://github.com/ggml-org/whisper.cpp/issues/3123

* command.wasm : add HEAPU8 to exported runtime methods

examples/command.wasm/CMakeLists.txt CHANGED
@@ -36,7 +36,7 @@ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
36
  -s INITIAL_MEMORY=1024MB \
37
  -s TOTAL_MEMORY=1024MB \
38
  -s FORCE_FILESYSTEM=1 \
39
- -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap']\" \
40
  ${EXTRA_FLAGS} \
41
  ")
42
 
 
36
  -s INITIAL_MEMORY=1024MB \
37
  -s TOTAL_MEMORY=1024MB \
38
  -s FORCE_FILESYSTEM=1 \
39
+ -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap', 'HEAPU8']\" \
40
  ${EXTRA_FLAGS} \
41
  ")
42
 
examples/stream.wasm/CMakeLists.txt CHANGED
@@ -35,7 +35,7 @@ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
35
  -s INITIAL_MEMORY=1024MB \
36
  -s TOTAL_MEMORY=1024MB \
37
  -s FORCE_FILESYSTEM=1 \
38
- -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap']\" \
39
  ${EXTRA_FLAGS} \
40
  ")
41
 
 
35
  -s INITIAL_MEMORY=1024MB \
36
  -s TOTAL_MEMORY=1024MB \
37
  -s FORCE_FILESYSTEM=1 \
38
+ -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap', 'HEAPU8']\" \
39
  ${EXTRA_FLAGS} \
40
  ")
41