News for hackers. Stuff that matters.
Re:Multithreading Rust and Wasm by davidhyde on Tuesday October 23, 2018 @11:37AM (#18284296)
Nice article. Now I know why the ManualResetEventSlim didn't work in c# Blazor. I wasn't aware that multi-threading in wasm was work in progress.

The demo doesn't work on the standard latest firefox yet unfortunately (ver 63.0). Error: "this browser does not have SharedArrayBuffer support enabled". I guess this is a nightly firefox build thing.

Re:Multithreading Rust and Wasm by sertorius on Tuesday October 23, 2018 @11:45AM (#18284363)
> this browser does not have SharedArrayBuffer support enabled

It was disabled for Spectre safety reasons, but it can be re-enabled by navigating to "about:config", searching for "javascript.options.shared_memory" and toggling it to enabled. (But it was obviously disabled for good reason, so might want to enable it temporarily)

Re:Multithreading Rust and Wasm by davidhyde on Tuesday October 23, 2018 @11:50AM (#18284404)
Thanks! That fixed that problem. Except now I get "this browser does not support passive wasm memory". There aren't any obvious javascript.options.* options for that.
Re:Multithreading Rust and Wasm by alexcrichton on Tuesday October 23, 2018 @11:53AM (#18284439)
Oh dear sorry about this, it's a little too non-obvious how to see the demo! I've [pushed a small commit](https://github.com/rustwasm/wasm-bindgen/commit/f016ae5846bf...) to update the demo to include information about browser requirements. Today this demo requires Firefox Nightly (64) and requires the `javascript.options.shared_memory` feature to be enabled. Other browsers will likely soon be able to run the demo as well!
Re:Multithreading Rust and Wasm by davidhyde on Tuesday October 23, 2018 @12:01PM (#18284538)
Thanks, I'll give that a go!
Re:Multithreading Rust and Wasm by TomMarius on Tuesday October 23, 2018 @11:43AM (#18284351)
Not experimental, you need to enable SharedArrayBuffer in config because it's unsafe (Meltdown/Spectre) as of now, fixes are being worked on.
Re:Multithreading Rust and Wasm by eksemplar on Tuesday October 23, 2018 @11:48AM (#18284395)
How are you finding Blazor in general? Is it worth looking into for smaller web apps or is it still far from production readiness?
Re:Multithreading Rust and Wasm by davidhyde on Tuesday October 23, 2018 @11:57AM (#18284493)
It's definitely worth looking into. Although the authors of the library keep reminding the reader that blazor is not production ready I have found that it does everything I need it to. I found that it either works or doesn't at all if there is an unhandled exception in your code to you try to do something that is not supported. However, I haven't found the behavior to be non-deterministic (by that I mean flaky). I guess they may want to change the API before release. What is amazing is the ability to reference .net standard libraries.