nmrugg / stockfish.js

The Stockfish chess engine in Javascript
GNU General Public License v3.0
928 stars 134 forks source link

Will Stockfish ever be able to provide workarounds for SharedArrayBuffer? #65

Closed gmcheems closed 1 year ago

gmcheems commented 2 years ago

I'm aware of the COOP and COEP headers needed to run newer stockfish versions (in order for SharedArrayBuffer to be enabled) but I'm in a situation where that's not possible.

So my question is: are there workarounds for SharedArrayBuffer or will stockfish.js always require that going fowards?

vovanezha commented 1 year ago

+1 for this. COOP and COEP headers break ads on my site, I can't use them

nmrugg commented 1 year ago

I know that COOP and COEP headers suck.

Browser vendors are preparing workarounds. Checkout credentialless/anonymous iframes. It's in origin trials now. This will likely be the way to fix this issue going forward.

You can fallback to an older Stockfish version for browsers that are unsupported.

I think it is unlikely that there will be another Stockfish.js that does not use SharedArrayBuffer. But I'm open to suggestions/contributions.