logoalt Hacker News

vinkelhakeyesterday at 9:33 PM5 repliesview on HN

You can write a WASM program today that touches the DOM, it just needs to go through the regular JS APIs. While there were some discussions early on about making custom APIs for WASM to access, that has long since been dropped - there are just too many downsides.


Replies

cedwsyesterday at 9:39 PM

But then you need two things instead of one. It should be made possible to build WASM-only SPAs. The north star of browser developers should be to deprecate JS runtimes the same way they did Flash.

show 3 replies
benruttertoday at 7:58 AM

I have slightly different question than OP - what's left until it feels like javascript is gone for people who don't want to touch it?

Say I really want to write front end code in Rust* does there just need to be a library that handles the js DOM calls for me? After that, I don't ever have to think about javascript again?

show 1 reply
zekriocayesterday at 9:53 PM

Could you list some of these downsides and what are the reason of their existence?

show 1 reply
lyu07282yesterday at 10:23 PM

I was under the impression that this very much still on the table, with active work like the component model laying the foundation for the ABI to come.

colordropsyesterday at 9:57 PM

Isn't going through the JS APIs slow?

show 1 reply