Re:What makes WebAssembly fast?
by AgentME on Tuesday February 28, 2017 @06:50PM
(#13759479)
You still have to ferry data in and out of Javascript to interact with the page. In the long-term, maybe language-specific bindings to interact with DOM APIs will become popular, but otherwise to get anything done in most cases you're probably going to expend enough effort on ferrying things in and out of JS land to negate the possible benefits of not needing to deal with a different language. I'd be surprised if many do it soon for anything more than a small high-performance core or for a large application that has a small DOM surface area (a game that just renders to a canvas).
[ Parent
| on HN ]
Re:What makes WebAssembly fast?
by Svenskunganka on Tuesday February 28, 2017 @07:01PM
(#13759554)
Yes of course, but only during the early stages. The post-MVP roadmap for WebAssembly specifies DOM & Web API integration (http://webassembly.org/docs/gc/), so that specific case will too disappear with time.
If you read point 3 on this page (http://webassembly.org/docs/high-level-goals/) you should realize that the need for JavaScript won't be required at that point.
edit: I'd like to clarify that I'm not saying wasm will boom in usage over night, but as time goes on, the rough edges clears up & features like these are added it might become the better choice.
Direct DOM access including manipulation is planned for WebAssembly.
They wanted to progress on the spec and push it out without that, but it's on the roadmap. (Along with GC integration).
Re:What makes WebAssembly fast?
by bluejekyll on Tuesday February 28, 2017 @09:43PM
(#13760498)
Can someone explain what the option is for accessing the dom initially? Is there some wrapper JS that will be needed to call into the wasm?
Re:What makes WebAssembly fast?
by steveklabnik on Tuesday February 28, 2017 @10:48PM
(#13760919)
Yup, see stuff like https://crates.io/crates/webplatform
Re:What makes WebAssembly fast?
by bluejekyll on Tuesday February 28, 2017 @11:06PM
(#13761016)
Omg, hello. How did I miss that!
Re:What makes WebAssembly fast?
by mikepurvis on Tuesday February 28, 2017 @10:00PM
(#13760594)