]> git.djapps.eu Git - pkg/ggml/sources/whisper.cpp/commit
examples : add HEAPU8 to all of the exported runtime methods (#3134)
authorEnes Grahovac <redacted>
Sat, 10 May 2025 04:44:13 +0000 (00:44 -0400)
committerGitHub <redacted>
Sat, 10 May 2025 04:44:13 +0000 (06:44 +0200)
commit5d4390d28109050a26e10bc40d1dc577406c0071
tree7458b434bf6e51cc6552198dbf1d0451e101f400
parent97916476537245463d47c25cf800dd2275c76fcd
examples : add HEAPU8 to all of the exported runtime methods (#3134)

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:

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

danbev originally fixed this for whisper.wasm, stream.wasm, and command.stream, but the issue still exists on the other examples which I patch in this code.

Resolves: #3059
examples/bench.wasm/CMakeLists.txt
examples/wchess/wchess.wasm/CMakeLists.txt