4 ms·
WebAssembly in the browser didn't have its breakthrough so far and probably will never have. The problems WA tries to solve are no big problems, if problems at
by secondWave12 6y ago
WebAssembly in the browser didn't have its breakthrough so far and probably will never have. The problems WA tries to solve are no big problems, if problems at all:
- Typescript is an excellent language.
- Performance of Javascript is for 99% of all the websites more than good enough.
- New frameworks like Svelte are much more mobile friendly in terms of computational overhead or time to first render.
Also, work on WA has pretty much stalled.
- zekrioca 6y agoDo not constrain yourself to today, but rather to what is to come. For instance, Iot apps running in Edge and cloud datacenters.
- sriku 6y agoUI in the browser isn't the right frame to think about webassembly. The right frame is wherever you can benefit from running a piece of potentially untrusted code within a sandbox. This is important for platform vendors who have to run cuatomer code that they can't trust. It is also important to run what would otherwise be unsafe code in the browser (ex: I use it for audio encoding/decoding and processing). It can serve as a "plugin" mechanism for host applications that need high performance for the plugins along with safety (ex: image proc, NN models). Environments where you need extreme granular control over what's permitted for the module (hence WASI and CloudABI).
- k__ 6y agoYou can compile languages like C/C++ and Rust to it. Sometimes this gives a performance boost, but most of the time it gives you just more uniform performance behavior. Then you can compile stuff like Java or C# to it, but end up with huge runtime bundles. But you get much of the C# behavior from TypeScript without the huge runtime, because it compiles directly to JavaScript.
- wtetzner 6y agoIt also allows you to run existing code in the browser, without having to do a rewrite.
- stjohnswarts 6y agoThis seems like the biggest advantage to me. Not everyone wants to rewrite and debug their several thousands of line rust/c++ program into typescript.
- pjmlp 6y agoFrom where I am, there are lots of frameworks adopting WebAssembly and I am looking forward to get back my Flash like development experience.
- phailhaus 6y agoLook at squoosh.app. They cross-compiled image compression libs to the browser, which means that they don't have to reimplement anything for the web, and now you can use it securely from any browser. AutoDesk was able to cross-compile their decades-old millions+ line C++ codebase to wasm, now they have a web product. Fastly and Cloudflare _only_ support wasm/javascript for their edge cloud compute solutions; but since they support wasm, you can write your functions in C++/Rust and run it with nearly the same performance characteristics. Lots of reasons to use webassembly, it's just getting started!