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 Webassembly Threads / Threaded Webassembly #5200

Open
greigs opened this issue Nov 27, 2019 · 6 comments
Open

Add Webassembly Threads / Threaded Webassembly #5200

greigs opened this issue Nov 27, 2019 · 6 comments

Comments

@greigs
Copy link

greigs commented Nov 27, 2019

I know wasm threads are now supported in chrome but I'd like to know if this is the case for other browsers.
http://webassembly.github.io/spec/core/

(The overall feature rather than wait / notify)

@niklasf
Copy link

niklasf commented Dec 6, 2019

From my research for stockfish.wasm:

Chromium based (desktop only):

  • Since 79: Full support
  • Since 74: Support, but without growable shared memory
  • 70 to 73: Needs flag chrome://flags/#enable-webassembly-threads or Origin Trial

Firefox:

  • Since 79: Full support
  • 72 to 78: Structured cloning can no longer be enabled with flags, except on nightlies
  • 71: Requires javascript.options.shared_memory and dom.postMessage.sharedArrayBuffer.withCOOP_COEP to be enabled in about:flags
  • 68 to 70: Requires javascript.options.shared_memory to be enabled in about:flags

Other browsers: No support.


Updated 2020-11-05

@kiding
Copy link
Contributor

kiding commented Nov 5, 2020

Along with SharedArrayBuffer being re-enabled, WebAssembly Threads are also available since Firefox 79.

@wffurr
Copy link

wffurr commented Nov 20, 2020

Threads in FF 79 (and Chrome Android / M91 desktop) will require the COOP/COEP headers as a mitigation for Spectre-style side-channel attacks: https://web.dev/coop-coep/

NodeJS supports threads as of v12.0.0 but requires the v8 flag --experimental-wasm-threads.

@Schweinepriester
Copy link
Contributor

Seemingly available in Safari 14.1 https://webkit.org/blog/11648/new-webkit-features-in-safari-14-1/#:~:text=WebAssembly-,threading,-WebAssembly:

In this release, WebKit added WASM threading to support CPU-intensive applications that need to work across CPU threads to preserve application performance.

Not sure about TP, didn't find it in the release notes…

@rtrussell
Copy link

Webassembly Threads still not supported in iOS browsers, sadly. Does anybody know when this might be coming?

@wffurr
Copy link

wffurr commented Oct 18, 2023

It's been supported since iOS Safari 15.2 with COOP/COEP enabled IIUC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants