News for hackers. Stuff that matters.
Re:Wgpu-rs on the web by satvikpendem on Thursday April 23, 2020 @07:36AM (#22954888)
I can't see a Rust framework becoming one of the top web frameworks simply by virtue that Rust is more complex to learn and implement than Javascript. However, I can see your second point coming true, a fully native framework that eschews the DOM by compiling directly onto a canvas, just as a game compiled with WASM would. The prime example is Flutter Web, which has an experimental WASM renderer that displays onto a canvas. Of course, now they have to reimplement all of the functionality such as scrolling, accessibility and so on. It also somewhat addresses your second point, where you can compile to iOS and Android but also to the web so you can make a Flutter app a progressive web app.
Re:Wgpu-rs on the web by olah_1 on Thursday April 23, 2020 @09:04AM (#22955454)
> a fully native framework that eschews the DOM by compiling directly onto a canvas

Wouldn't that essentially be the death of accessibility on the web, though?

Re:Wgpu-rs on the web by satvikpendem on Thursday April 23, 2020 @10:04AM (#22956077)
I see this concern a lot with Flutter or similar WASM -> canvas frameworks, and I think it's unfounded. Just because it's a canvas doesn't mean there's no accessibility. Indeed, even desktop apps are canvas like in that one cannot view the source and they can render using similar frameworks like Skia, or even Skia itself, yet they still have accessibility.

Flutter's developers have specifically included accessibility settings that devs should use, such as Semantics widgets, just like aria labels for the web. Flutter also constructs a separate semantic DOM like tree that screen readers hook into. So there are both built in things and things that devs can use to make their projects more accessible.

This video shows more about it: https://www.youtube.com/watch?v=bWbBgbmAdQs

https://flutter.dev/docs/development/accessibility-and-local...

https://api.flutter.dev/flutter/widgets/Semantics-class.html

Re:Wgpu-rs on the web by olah_1 on Thursday April 23, 2020 @10:21AM (#22956286)
My comment was less about possibility and more about willingness.

But it looks like many are taking accessibility as a first-class concern, which is great to see.

Re:Wgpu-rs on the web by adev_ on Thursday April 23, 2020 @09:19AM (#22955592)
> Wouldn't that essentially be the death of accessibility on the web, though?

It does. And would condemn us to live again usability nightmare of the flash epoch.

People are confusing two things here: There is no need of replacing the DOM. There is a need to replace (modernize) the API controling the DOM.