DEV Community

Discussion on: WASM is AWSM

Collapse
 
pedro profile image
Pedro M. M. • Edited

WASM is awesome, is multi-threading ready yet? I can't wait to be able to code some super efficient multi-threaded module in rust and just call it from js. Also, electron apps could benefit greatly from this.

We live in times where you learn JS to write server side code and desktop apps (electron), and you also learn C++ / Rust to create browser apps.

This is a very interesting discussion. Anyone that have tried to build a desktop application with both: native bindings and css/html/js knows how delightful the experience of designing something with CSS is vs native bindings. This is one of the main reasons why electron apps tend to be more visual appealing and explains their increasing growth in the market (besides them being multi-platform, ofc).

WASM is a step in the right direction and could greatly improve the developing (and user) experience of desktop apps

Collapse
 
rreverser profile image
Ingvar Stepanyan

Yes, multithreading has been stable for some time now. Recently I wrote a guide on configuring and using it from various environments: web.dev/webassembly-threads/

Collapse
 
vibalijoshi profile image
vibalijoshi

Yes agreed! WASM is really exciting and a lot more people can now contribute towards web!
Also give this a read: rustwasm.github.io/2018/10/24/mult...

Collapse
 
ashoutinthevoid profile image
Full Name • Edited

Maybe there's a specific point about multithreading im not giving enough weight, but Electron apps are already benefiting from using Rust.
Discord uses it in their client (noted here though sparse on details; not the focus of that article). Aside from wasm, you also have the option of compiling a native node module. Example. And there are other ways to call a separate binary to do work that isn't ideal for Js.

Personally I didn't find the neon bindings any harder than wasm-bindgen, and in my use cases thus far I haven't had a reason to prefer wasm. It's a cool option to have though!

Wholeheartedly agree on the ease of web style gui development compared to other options.