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

Does wasmer.js have polyfill for threads? #332

Closed
temeddix opened this issue Oct 25, 2023 · 6 comments
Closed

Does wasmer.js have polyfill for threads? #332

temeddix opened this issue Oct 25, 2023 · 6 comments

Comments

@temeddix
Copy link

As the title says, does wasmer.js provide polyfill for threads, like std::thread in Rust?

@syrusakbary
Copy link
Member

Hey @temeddix , we are very close to release a new version of wasmer-js with support for threads and many more things already supported by WASIX. Stay tuned!

@temeddix
Copy link
Author

Thanks for the quick reply :) does that mean we can use WASI threads on web browsers?

@syrusakbary
Copy link
Member

syrusakbary commented Oct 25, 2023

Indeed, very soon!

@temeddix
Copy link
Author

Can't wait!

@syrusakbary
Copy link
Member

We just released @wasmer/sdk which fully supports WASIX. The API is a bit still in flux, but you can check some samples of how to use it here: https://github.com/wasmerio/wasmer-js/blob/main/examples/wasmer.sh/index.ts

@Michael-F-Bryan
Copy link
Contributor

The @wasmer/sdk package supports multi-threading and multi-processing, so I think it's okay to close this ticket.

One thing to keep in mind is that you need to compile to WASIX to use these APIs. WASI preview 1 doesn't include syscalls for threads or processes.

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