this post was submitted on 29 Jun 2024
87 points (93.1% liked)

Programming

17114 readers
312 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

Fullstack GUI library for web, desktop, mobile, and more. In Rust using a HTML + CSS renderer built on top of Servo.

you are viewing a single comment's thread
view the rest of the comments
[–] Max_P@lemmy.max-p.me 20 points 3 months ago* (last edited 3 months ago) (7 children)

I wish we went the other way around: build for native and compile to HTML/CSS/WASM.

For me the disadvantage of Electron is well, it doesn't have any advantage or performance improvement over the browser version for 99% of use cases, and when you shove that on a mobile phone it performs as horribly as the web version.

People already use higher level components that ends up shitting out HTML and CSS anyway, why not skip the middleman and just render the box optimally from the start? Web browsers have become good, but if you can skip parsing HTML and CSS entirely and also skip maintaining their state, that's even better.

I had the misfortune of developing a React Native app, and I'd say thinking in terms of rows and columns and boxes was nice. Most of RN's problems are because they still run JS and so you have to bundle node and have the native messaging bridge, and of course that it's tied to the turd that is React. But zero complains about the UI part when it doesn't involve the bridge: very smooth and snappy, much more than the browser. And the browser version was no different than standard React in performance.

I like that it's not yet another Chromium one at least.

[–] AVincentInSpace@pawb.social 1 points 3 months ago (1 children)

https://egui.rs/ promises to be able to do this, although I'm not positive it's ready for primetime

[–] Max_P@lemmy.max-p.me 2 points 3 months ago

egui is cool but it's an immediate UI kind of thing, that's usually used in video games as you're constantly re-rendering the whole thing anyway.

A more fitting UI library would be Iced, which is also what System76 is building their COSMIC desktop environment on.

It does claim to support the web too, although not via HTML which brings some accessibility concerns. I'd expect performance to be very good otherwise.

load more comments (5 replies)