by survirtual · 4y ago · 0 comments
But still no multithreading? https://github.com/bytecodealliance/wasmtime/issues/888
It is strange to me to call it 1.0 without seamless threading support and while wasm & wasi still have standards to work out.
Multithreading is a basic operation in everything I build right now. It allows me to make a highly responsive UI while doing massive computations without any user experience impact. It lets me make services which can handle thousands of requests a second. And with Rust, this all comes ergonomically. At this point, I can’t think of a single solution I would implement without doing some form of this.
While I could treat a wasm application as a client server model (have one module for interfacing / managing, have X for processing where X is the number of available cores) then share memory between them, this creates a lot of boilerplate and makes the code less ergonomic, and can drastically increase friction. I don’t want to have to hack threading into an application with so much manual setup, and I don’t like when a runtime forces architecturally decisions because it lacks a basic capability.
Anyway, congrats on the release. I will look forward to 2.0 of these runtimes.
So need to come up with some hacks so my code can do basic things like locks with shared memory. Not sure what these folks are thinking but I’m looking forward to a day when one codebase truly works everywhere.