spicylobstergames / shotcaller-minigene

A moddable RTS/MOBA game made with bracket-lib and minigene.
https://www.notion.so/erlendsh/Shotcaller-7374d2b2819c42ccb40f01dc7089d419
Other
152 stars 12 forks source link

Wasm Compability Issue #10

Closed AnneKitsune closed 3 years ago

AnneKitsune commented 4 years ago

Here is what I posted on the rust discord server. Still waiting for a reply.

I have some issues getting SharedArrayBuffer to work properly on newer firefox versions.

I did the changes required from https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer/Planned_changes but had no success in using post_message in a web worker.

I did verify that both headers are set and that the window is in a secure context. The SharedArrayBuffer does work, but when using post_message from the web worker, I get a panic.

My project uses the web_worker crate, which is itself based on the wasm_bindgen/examples/raytrace_parallel. This example is also broken.

Anyone knows who is the current maintainer of the wasm_bindgen examples?

erlend-sh commented 3 years ago

We’ve got a working web version now: https://shotcaller.jojolepro.com/

Can this be considered resolved? Is our workaround documented?

AnneKitsune commented 3 years ago

The workaround we used is that we created a single-threaded specs dispatcher. This way, we don't need to get threads to work with wasm at all. Bracket was really helpful with this :)