DEV Community

Discussion on: Explain the State of WebAssembly to Me

Collapse
 
yaser profile image
Yaser Al-Najjar • Edited

Ever thought of the web browser as an operating system just like Windows / Linux?

That's what web assembly is about, so that now we can use languages like C or Rust.

Why:

FASTER PERFORMANCE.

Use Cases:

Heavy desktop apps or games

Collapse
 
dystroy profile image
Denys Séguret • Edited

For me it's not really about performances.

Most of the slowness of in-browser apps isn't because of JavaScript but because of bad designs, of bad frameworks, of bugs like memory leaks, of developers badly understanding how a browser computes and renders things.

For me it's about correctness and code ergonomics.

That's why my next in-browser application will probably be in Rust/Wasm.

Collapse
 
yaser profile image
Yaser Al-Najjar

Hmmm, so you tell me that it is possible to create a performance-greedy game like GTA V in the browser?

Thread Thread
 
dystroy profile image
Denys Séguret

This isn't the usual use case, so I wasn't really answering this problem.

For such a game, the problem is also less the language (but it matters, yes) than the underlying solution to render on screen. Even with webassembly you still have no direct access to low level primitives, best you can do is using webgl.

Thread Thread
 
yaser profile image
Yaser Al-Najjar • Edited

Well, I see it as the main problem webassembly is solving...

Since as you mentioned already, most apps are slow cuz of bad code.

But webassembly is here to let you write desktop-like performant apps/games.

Here are some discussions in this regard: github.com/WebAssembly/WASI/issues/53