]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commitdiff
stream.wasm : add HEAPU8 to exported runtime methods (#3130)
authorDaniel Bevenius <redacted>
Thu, 8 May 2025 14:58:34 +0000 (16:58 +0200)
committerGitHub <redacted>
Thu, 8 May 2025 14:58:34 +0000 (16:58 +0200)
* 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
examples/stream.wasm/CMakeLists.txt

index 3117e1666bc81d8c50e5eba6e475e6a44db1a919..7c2c4293c9480a948179f208a2e660b0c8c1fca6 100644 (file)
@@ -36,7 +36,7 @@ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
     -s INITIAL_MEMORY=1024MB \
     -s TOTAL_MEMORY=1024MB \
     -s FORCE_FILESYSTEM=1 \
-    -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap']\" \
+    -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap', 'HEAPU8']\" \
     ${EXTRA_FLAGS} \
     ")
 
index 9774062e415ea2a2d1a4330135a6f3b52457d859..47b0b6b36614287efd63a20e878fff4e319620c5 100644 (file)
@@ -35,7 +35,7 @@ set_target_properties(${TARGET} PROPERTIES LINK_FLAGS " \
     -s INITIAL_MEMORY=1024MB \
     -s TOTAL_MEMORY=1024MB \
     -s FORCE_FILESYSTEM=1 \
-    -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap']\" \
+    -s EXPORTED_RUNTIME_METHODS=\"['print', 'printErr', 'ccall', 'cwrap', 'HEAPU8']\" \
     ${EXTRA_FLAGS} \
     ")