Hacker News new | ask | show | jobs
by isosphere 672 days ago
One gotcha that would bug me with Rust/WASM today is concurrency in the browser. You only get one thread per WASM binary AFAIK, and the way to compute in the background is to use a web worker.

The abstraction libraries that are higher level than web_sys don't support transferable objects currently, so you'd have to write your web worker in web_sys directly to avoid needless data copying. It's pretty doable, and I've gotten started on a crate abstracting this part, but it's been a serious willpower blocker for me.

One thread is pretty limiting for any web app today. As soon as you want to do something interesting, you're blocking the main thread.