all 10 comments

[–]Tbfleming 9 points10 points  (2 children)

That should happen with the Host Bindings Proposal

[–]xiaodai[S] 1 point2 points  (1 child)

Hopefully soon

[–]Tbfleming 0 points1 point  (0 children)

Until then you can use emscripten::val. Actually, after then, you can probably use emscripten::val; I imagine they'll update its implementation.

[–]defunkydrummer 3 points4 points  (1 child)

This is something that is asked a lot, however, I have the hope of a near-future (2 years?) where more modern GUI toolkits totally replace the current use of HTML+CSS, which is a technology that was originally intended for page presentation, not UI interaction.

A good GUI toolkit could make SPA applications far faster to build than right now. And if everything is done within WASM, they would also run pretty fast as well!

[–]Edregol 2 points3 points  (0 children)

I'm so hoping for that too. Hopefully finally a sane way to create web frontends without debugging code that doesn't get interpreted the way it should be for some random reason.


Arg, someone just hurry up and make it already. For most devs it won't be worth it to work with WASM until it can directly access the DOM, so in that sense it is not really an MVP until it does have this.

[–]Tazebr123 1 point2 points  (2 children)

Could you please expand on that? Current access to the DOM is done through Javascript. So it is not like it is not possible to access the DOM.


Sure it is possible, but it is laggy compared to what we would see if it allowed direct DOM manipulation and compared to only using JavaScript without WASM.

I see 2 main reasons to want to use WASM:

1) Speed increase. This reason is blown away by laggy DOM interfacing through laggy JavaScript interfacing except for strange edge cases that won't apply to most developers.

2) Language preference. Many developers find WASM attractive simply because they can use a language they prefer over JavaScript. But if doing so causes their website to become more laggy, they won't consider it to be worth it.

[–]Tazebr123 0 points1 point  (0 children)

Agree. I see one more reason: -Having code already developed/debugged in other language (C or C++), WASM allows porting this code over to the browser.

[–]deadA1ias 0 points1 point  (0 children)