Skip to content

examples : add HEAPU8 to all of the exported runtime methods #3134

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

enesgrahovac
Copy link
Contributor

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 originall fixed this for whisper.wasm, but the issue still exists on the other examples which I patch in this code.

Resolves: #3059

@danbev danbev merged commit 5d4390d into ggml-org:master May 10, 2025
52 checks passed
@danbev
Copy link
Member

danbev commented May 10, 2025

@enesgrahovac Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WASM version not working: Cannot read properties of undefined (reading 'buffer')
2 participants