Becavalier / Becavalier/Book-DISO-WebAssembly

run WebAssembly Standalone type report TypeError

Open
#9 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
WebAssembly
Stars
72
Forks
16
PR merge metrics
No merged PRs in 30d

Description

参照书中第5章5.2.1,构建Standalone类型的 wasm,在火狐和google浏览器中运行生成的html文件,报 TypeError: exportFuncAdd is not a function。

但是直接使用你在git上提供的 html 和 wasm,却能正常运行。书中的编译命令
emcc emscripten-standalone.cc -Os -s WASM=1 -o emscripten-standalone.js ,不知道是不是emcc 版本问题,还是编译方式需要调整?

我的emcc 版本为
emcc (Emscripten gcc/clang-like replacement) 1.38.31 (commit 55ad1c4502293cc0f6ce8d5a249c941eee604269)

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the standalone example and the documented command `emcc emscripten-standalone.cc -Os -s WASM=1 -o emscripten-standalone.js`. Reproduce the generated HTML in Firefox and Google Chrome using Emscripten 1.38.31, then compare it with the repository's provided HTML and WASM; done means identifying whether the TypeError is caused by the compiler version or the build command.

Written by the indexing model from the issue text.

Assessment

Tech stack
wasm
Domain
compilers, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.