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

Add threading support based on wasi-threads #101538

Closed
yamt opened this issue Feb 3, 2023 · 3 comments
Closed

Add threading support based on wasi-threads #101538

yamt opened this issue Feb 3, 2023 · 3 comments
Labels
expert-WebAssembly type-feature A feature request or enhancement

Comments

@yamt
Copy link

yamt commented Feb 3, 2023

Feature or enhancement

use wasi-threads via wasi-sdk

Pitch

Previous discussion

Linked PRs

@yamt yamt added the type-feature A feature request or enhancement label Feb 3, 2023
yamt added a commit to yamt/cpython that referenced this issue Feb 3, 2023
eg.
```
autoconf
export WASI_SDK_PATH=/opt/wasi-sdk-19.5g0236e959edbc
./Tools/wasm/wasm_build.py wasi-threads build
~/git/toywasm/b.thread/toywasm --wasi --wasi-dir . --wasi-dir ~/git/garbage/py/th2 -- builddir/wasi-threads/python.wasm ~/git/garbage/py/th2/thread.py
```

* I used an unreleased version of wasi-sdk

* I used toywasm to test because wasmtime doesn't have
  necessary functionality yet.
yamt added a commit to yamt/cpython that referenced this issue Feb 3, 2023
eg.
```
autoconf
export WASI_SDK_PATH=/opt/wasi-sdk-19.5g0236e959edbc
./Tools/wasm/wasm_build.py wasi-threads build
~/git/toywasm/b.thread/toywasm --wasi --wasi-dir . --wasi-dir ~/git/garbage/py/th2 -- builddir/wasi-threads/python.wasm ~/git/garbage/py/th2/thread.py
```

* I used an unreleased version of wasi-sdk

* I used toywasm to test because wasmtime doesn't have
  necessary functionality yet.
@brettcannon
Copy link
Member

My concerns about supporting this is that wasi-threads is only at phase 1 of (I believe) 4, so this is not close to being available publicly as part of WASI itself.

The WASI SDK support is also not released yet (although I see the OP is the author of the support that's in their main branch 😉). I also don't know how many WASI runtimes support this proposal (e.g. wasmtime doesn't, but does wasmer, wasmedge, iwasm/WAMR, etc.?). Basically this seems very experimental and I would prefer we were not providing direct support and thus the ones that will get the bug reports on the feature.

As such, I'm unfortunately going to need to reject this feature request. Maybe Singlestore Labs or VMWare via their builds would be up for taking this on? Otherwise I would suggest keeping a fork going with your changes and release your own build if you're trying to get testing for wasi-threads specifically.

@brettcannon brettcannon closed this as not planned Won't fix, can't repro, duplicate, stale Feb 10, 2023
@yamt
Copy link
Author

yamt commented Feb 11, 2023

My concerns about supporting this is that wasi-threads is only at phase 1 of (I believe) 4, so this is not close to being available publicly as part of WASI itself.

The WASI SDK support is also not released yet (although I see the OP is the author of the support that's in their main branch 😉). I also don't know how many WASI runtimes support this proposal (e.g. wasmtime doesn't, but does wasmer, wasmedge, iwasm/WAMR, etc.?). Basically this seems very experimental and I would prefer we were not providing direct support and thus the ones that will get the bug reports on the feature.

wasmtime support has been landed in the meantime.
wamr has a support on a dev branch.

As such, I'm unfortunately going to need to reject this feature request. Maybe Singlestore Labs or VMWare via their builds would be up for taking this on? Otherwise I would suggest keeping a fork going with your changes and release your own build if you're trying to get testing for wasi-threads specifically.

@brettcannon
Copy link
Member

We can re-evaluate once wasi-sdk has support in a release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
expert-WebAssembly type-feature A feature request or enhancement
Projects
None yet
Development

No branches or pull requests

3 participants