Live data from Hacker News

When Is WebAssembly Going to Get DOM Support?

queue.acm.org

141–150 of 213 posts

Re: When Is WebAssembly Going to Get DOM Support?

#141

Earlier quoted context omitted.

Yeah, it's very unfortunate for WebGL/WebGPU apps, where every call has to pass/convert typed arrays and issue a js gl call. It pretty much kills any advantage of using WASM. Hope that changes.

How can you reconcile this with all of the AAA games that have been shown to work well on Wasm+WebGL ? What is different between your usage and theirs?

Which AAA games run well on Wasm+WebGL?

Re: When Is WebAssembly Going to Get DOM Support?

#142

Disclaimer: I work on Jco, one of the user-facing Bytecode Alliance WASM JS ecosystem projects Just a note, but there is burgeoning support for this in "modern" WebAssembly: https://github.com/bytecodealliance/jco/tree/main/examples/c... If raw WebIDL binding generation support isn't interesting enough: https://github.com/bytecodealliance/jco/blob/main/packages/j... https://github.com/bytecodealliance/jco/blob/main/p…

I have used Jco quite a bit (and contributed a few times) to build out simple utilities binding Rust code to JS [1][2]. I think it is great and the Component Model is the most exciting step towards real useful polyglot libraries I have seen in years. I wish it were better publicized, but I understand keeping things lowkey until it is more fleshed out (the async and stream support coming in Preview 3 are the real miss…

Thanks for using and contributing to Jco!

> (the async and stream support coming in Preview 3 are the real missing pieces for my usecases).

Currently this is a huge focus of most of the people working on stuff, and Jco is one of the implementations that needs to be done before P3 can ship, so we're hard at work on it.

> exciting step towards real useful polyglot libraries I have seen in years

I certainly agree (I'm biased) -- I think it's going to be a kind of tech that is new for a little bit and then absolutely everywhere and mostly boring. I think the docker arc is almost guaranteed to happen again, essentially.

The architectural underpinnings, implementation, and possibilities unlocked by this wave of Wasm is amazing -- truly awesome stuff many years in the making thanks to many dedicated contributors.

Re: When Is WebAssembly Going to Get DOM Support?

#143

Earlier quoted context omitted.

Yeah, it's very unfortunate for WebGL/WebGPU apps, where every call has to pass/convert typed arrays and issue a js gl call. It pretty much kills any advantage of using WASM. Hope that changes.

How can you reconcile this with all of the AAA games that have been shown to work well on Wasm+WebGL ? What is different between your usage and theirs?

A quick search shows that there aren't any AAA games that support those platforms. What are you referring to?

Re: When Is WebAssembly Going to Get DOM Support?

#144
post #116

Is there any data on the performance cost of JS/WASM context switches? The way the architecture is described, it sounds as if the costs could be substantial, but the approaches described in the article basically hand them out like candy. This would sort of defeat the point that WASM is supposed to be for the "performance critical" parts of the application only. It doesn't seem very useful if your business logic runs…

According to a benchmark from 2018 it might not be expensive to go between js and wasm https://hacks.mozilla.org/2018/10/calls-between-javascript-a...

It is still the same jit calling itself, there is no reason it should be far slower than js-to-js

Re: When Is WebAssembly Going to Get DOM Support?

#145
post #96
post #73

Earlier quoted context omitted.

But now you can do more in the browser than back then with Java applets. Crypto miners weren’t a thing for Java applets

Only because Java Applets died before crypto mining became a thing/got turned into a "click to enable" thing because security problems.

That’s my point. It’s Java applets all over again but now with crypto miners

Re: When Is WebAssembly Going to Get DOM Support?

#146
post #18

Earlier quoted context omitted.

WASM certainly had the potential for this, but I am afraid without direct DOM access it is never going to happen.

It is happening. Leptos is an example: https://www.leptos.dev/ Dioxus is another: https://dioxuslabs.com/ C# with Avalonia for a different use case: https://avaloniaui.net/ Avalonia solitaire demo: https://solitaire.xaml.live/ Avalonia Visual Basic 6 clone: https://bandysc.github.io/AvaloniaVisualBasic6/ Blazor can run as WebAssembly on the client side if you choose that runtime mode: https://dotnet.microsoft.com/en-…

Btw there is also Dominator: https://github.com/Pauan/rust-dominator

Re: When Is WebAssembly Going to Get DOM Support?

#147

Earlier quoted context omitted.

I'm not sure how it's for others, but for me there was a perception issue with java applets on the web in the mid 2000s: Java applets loading on a website started as a gray rectangle, which loaded very slowly, and sometimes failed to initialize with an "uninited" error. Whenever you opened a website with a java applet (like could happen with some math or physics related ones), you'd go "sigh" as your browser's UI thr…

The fact that we said “Java” and you went to thinking about “Java applets” is part of the problem. Java was meant to be a universal executable format. It ended up confined to the web (mostly, at least in the popular consciousness).

Yup, "Enterprise Java" really grated.

Until it didn't.

Re: When Is WebAssembly Going to Get DOM Support?

#148

Earlier quoted context omitted.

Why did Java fail though, and why would wasm succeed when the underlying philosophy is the same?

I asked a number of times on HN why wasm was good when java applets, exactly the same thing, were bad. There was a vague feeling that java applets were insecure and that this would somehow not be an issue for wasm. It's not just applets; we also had Flash, which was a huge success until it was suddenly killed. As far as I can tell, the difference between java applets and Flash is that you, the user, have to install j…

Off-topic but... whatever happened to Real Player? Installing that was always a nightmare.

Re: When Is WebAssembly Going to Get DOM Support?

#149
post #3

We use WASM quite a bit for embedding a ton of Rust code with very company specific domain code into our web frontend. Pretty cool, because now your backend and frontend can share all kinds of logic without endless network calls. But it’s safe to say that the interaction layer between the two is extremely painful. We have nicely modeled type-safe code in both the Rust and TypeScript world and an extremely janky layer…

WASM is just hotfixing javascript to use any language people want.

It's all about javascript being popular and being the standard language, js is not a great language, but it's standard across every computer, which dwarfs anything that can be said about js.

Adjusting browsers so they can use WASM was easy to do, but telling browser vendors to make the DOM work was obviously more difficult, because they might handle the DOM in various ways.

Not to mention js engines are very complicated.

Re: When Is WebAssembly Going to Get DOM Support?

#150
Blame browsers.

Things like QT and browsers became popular because people realize they could short circuit OS vendors asking developer to be loyal to them. The glue won.

But QT and browsers and JS are just hotfixes, they're not sound technologies, they're just glue.

Post reply on HN