WebAssembly / wasi-threads

146 stars 8 forks source link

should memory be exported as well? #22

Open yamt opened 1 year ago

yamt commented 1 year ago

discussions: https://github.com/WebAssembly/wasi-libc/pull/369#discussion_r1053853546 https://github.com/WebAssembly/wasi-threads/pull/19#discussion_r1061484551 https://github.com/WebAssembly/WASI/pull/48#discussion_r289338186

sbc100 commented 1 year ago

As a reference point, emscripten has been shipping multi-threaded apps based on workers (instance-per-thread) for a while now, and the shared memory is always imported by the module in this case (and never exported).

abrown commented 1 year ago

@sunfishcode and I had talked some time ago about switching the WASI paradigm from "export the memory" to "import the memory." It might break some things but I would recommend discussing that over in the WASI repository and seeing if that change can be made now before too many things depend on that fact.

yamt commented 1 year ago

@sunfishcode and I had talked some time ago about switching the WASI paradigm from "export the memory" to "import the memory." It might break some things but I would recommend discussing that over in the WASI repository and seeing if that change can be made now before too many things depend on that fact.

it makes sense. i created an issue there. https://github.com/WebAssembly/WASI/issues/502