Open
Description
Reading https://github.com/WebAssembly/threads/blob/master/proposals/threads/Overview.md#initializing-memory-only-once, with
The data segments are always copied into linear memory, even if the same module
is instantiated again in another agent. One way to ensure that linear memory is only
initialized once is to place all data segments in a separate module that is only
instantiated once, then share the linear memory with other modules.
if I understand this correctly, this will prevent Emscripten and other compilers from being able to place data and code sections in the same .wasm
file, but must always use two separate files for them, similar to how .mem
files are being used in asm.js.
It sounds like it would be easy to add a Module.instantiate(..., noDataSegment: true);
type of machinery to avoid this? Given that there's an explicit paragraph about this in the document, I presume this approach has been considered already before, and was turned down? I'm curious, what was the conversation about it back then?
Metadata
Metadata
Assignees
Labels
No labels