emscripten-core / emscripten-core/emscripten

Cannot use ALLOW_MEMORY_GROWTH when execute the standalone wasm.

Open
#18,197 3 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
27.6k
Forks
3.6k
Avg merge
1d 1h
Merged PRs (30d)
105

Description

Hello everyone, last week I tried to use my wasm runtime (WasmEdge) to execute the standalone wasm compiled from c code by emcc. The main content of my compile command is ``emcc -O3 -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 atax.c -DPOLYBENCH_TIME -DNDEBUG -o atax_time.wasm -s STANDALONE_WASM''

But I got this error.

201567071-6dc695af-54e1-46a7-ba4f-b1b14f257882

I guess it's because the "env" and "emscripten_notify_memory_growth" should be loaded in js. So how can I set allow_memory_growth when I want to execute standalone wasm in my wasm runtime?

PS: Following is my output of "emcc -v"
201565783-1e9209da-36b3-42e1-ba7c-b8b92cfb03da

Thanks for any help!

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.