Unofficial Hacker News companion — get notified on comment replies, and more.

GPUI is getting its own repository (opens external site)

389 points by EvilGoose 8 days ago | github.com | 145 comments on HN | Vote on HN (opens Hacker News) |

View full thread · View on Hacker News

Comment thread (11)

  1. egui is the most mature, has built in accessibility, and is quite ergonomic and flexible. iced is a good alternative, it’s used for cosmic desktop and is a good option if you don’t want an imgui. if you’re happy with the trade off of using a web view, dioxus is really good - you still build the ui in native rust (not wasm) and the web view is used purely for rendering so that negates some of the cons of something like tauri (no ipc mechanisms required), and you get the rendering and accessibility of the web.

    honourable mention to slint, seems mature and good but I’ve never personally used it.

    Replies (3)
    1. Cosmic runs a fork of iced, not iced proper.
    2. egui is designed for english only game dev tools. It is not remotely mature for actual tools that support CJK, IMEs, and accessibility
      Replies (2)
      1. egui is not designed for english only game dev tools.

        you can make it work for whatever usecase you want. that's the beauty of oss.

        Replies (1)
        1. That's about as useful a statement as saying assembly language supports windows and networking and graphics rendering because you can make it do whatever you want.

          If it doesn't do it out of the box then it doesn't do it and you're adding the feature, the library is providing nothing.

          Further, arguably egui's design is arguably incompatible most OS level widgets that provide all the interaction. So choosing it is going to eventually lead to a dead end where you need to remove it for something that doesn't have that design constraint. That's why ImGUIs are not recommended for anything other than dev facing tools. Once you hit the real world of all languages the world over you find the long tale of things an ImGUI doesn't do and was never designed to do.

      2. Most of this no longer seems to be true. In fact I just happened to have evaluated especially the text box handling for all the important frameworks last week and egui ended up at the top: https://gist.github.com/CryZe/9dfc2aa74604b31d4f57144e1c92b5...
        Replies (1)
        1. Context menu fails, that's literally where all the OS integration happens.
    3. egui is immediate mode. That rules it out for reasonable performance for complex apps.
      Replies (2)
      1. not true at all. If anything imgui’s scale better for complex apps
        Replies (1)
        1. I'm currently building a complex app on GPUI. It has both immediate and retained mode. And no, without retained mode it is impossible to obtain fast speeds. Complex gui's take time to render. You simply can't be re-rendering things all the time.

          And the minute you start going along the lines of "well why don't you cache unchanged parts of the UI as images" now you may as well go for a retained mode UI because you're reinventing the wheel.

      2. Data point from building a fairly complex egui app (Ferrite, a Markdown/JSON/YAML editor; I'm the author): immediate mode wasn't the bottleneck, the stock TextEdit was. With a custom rope buffer and virtual scrolling it handles 100 MB+ files