Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

should memory be exported as well? #22

Open
yamt opened this issue Jan 5, 2023 · 3 comments
Open

should memory be exported as well? #22

yamt opened this issue Jan 5, 2023 · 3 comments

Comments

@yamt
Copy link
Contributor

yamt commented Jan 5, 2023

discussions:
WebAssembly/wasi-libc#369 (comment)
#19 (comment)
WebAssembly/WASI#48 (comment)

@sbc100
Copy link
Member

sbc100 commented Jan 5, 2023

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
Copy link
Collaborator

abrown commented Jan 6, 2023

@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
Copy link
Contributor Author

yamt commented Jan 6, 2023

@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. WebAssembly/WASI#502

yamt added a commit to yamt/wasi-threads that referenced this issue Jan 11, 2023
While it's a bit redundant to both import and export a memory,
it's what WASI implementations expect.

Import alone is fine but export wouldn't hurt: Emscripten, toywasm

Export is checked: wasm-micro-runtime

Export is necessary?: wasmtime

References:
https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md#current-unstable-abi
WebAssembly#22
yamt added a commit to yamt/wasi-threads that referenced this issue Jan 11, 2023
While it's a bit redundant to both import and export a memory,
it's what WASI implementations expect.

Emscripten, toywasm:
Import alone is fine. But export wouldn't hurt.

wasm-micro-runtime:
Export is checked. Nothing actually seems to rely on it though.

wasmtime:
Export is necessary?

References:
https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md#current-unstable-abi
WebAssembly#22
yamt added a commit to yamt/wasi-threads that referenced this issue Jan 23, 2023
While it's a bit redundant to both import and export a memory,
it's what WASI implementations expect.

Emscripten, toywasm:
Import alone is fine. But export wouldn't hurt.

wasm-micro-runtime:
Export is checked. Nothing actually seems to rely on it though.

wasmtime:
Export is necessary?

References:
https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md#current-unstable-abi
WebAssembly#22
yamt added a commit to yamt/wasi-threads that referenced this issue Jan 23, 2023
While it's a bit redundant to both import and export a memory,
it's what WASI implementations expect.

Emscripten, toywasm:
Import alone is fine. But export wouldn't hurt.

wasm-micro-runtime:
Export is checked. Nothing actually seems to rely on it though.

wasmtime:
Export is necessary?

References:
https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md#current-unstable-abi
WebAssembly#22
yamt added a commit to yamt/wasi-threads that referenced this issue Jan 23, 2023
While it's a bit redundant to both import and export a memory,
it's what WASI implementations expect.

Emscripten, toywasm:
Import alone is fine. But export wouldn't hurt.

wasm-micro-runtime:
Export is checked. Nothing actually seems to rely on it though.

wasmtime:
Export is necessary?

References:
https://github.com/WebAssembly/WASI/blob/main/legacy/application-abi.md#current-unstable-abi
WebAssembly#22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants