emscripten-core / emscripten-core/emscripten
Access a Modules WebAssembly.Table and WebAssembly.Memory
Open
- Dominant language
- C++
- Stars
- 27.6k
- Forks
- 3.6k
- Avg merge
- 1d 1h
- Merged PRs (30d)
- 105
Description
I need to call a function by its index in the `WebAssembly.Table`. How can I access the table of a module?
The same goes for memory, how can I get a reference to `WebAssembly.Memory`?
I know that I can explecitly passs `Module['wasmMemory']` when creating the module and then the emscripten generated js will use this as memory. But I don't want to create the memory on my own since I don't know the settings that were used when the module was compiled. Rather I want the emscripten generated js to create the memory and then access it.
I currently use `Module['HEAP8']` to access the buffer. Is this safe?
Contributor guide
Assessment
This issue has not been assessed yet.