An unofficial, read-only Hacker News reader.

GPUI is getting its own repository (opens external site)

388 points by EvilGoose 6 days ago | github.com | 144 comments on HN

View full thread · View on Hacker News

Comment thread (26)

  1. What else would you recommend? egui?
    Replies (3)
    1. Not the OP, but:

         1. egui (30.3M total / 9.2M last 90 days) (note: immediate mode)
            https://crates.io/crates/egui
      
         2. Iced (3.2M / 770k)
            https://crates.io/crates/iced
      
         3. Slint (2.4M / 955k) (note: GPL/commercial license)
            https://crates.io/crates/slint
      
         5. Dioxus Native (181k / 26k)
            https://crates.io/crates/dioxus-native
      
         6. Freya (49k / 12k)
            https://crates.io/crates/freya
      
         7. Floem (45k / 15k)
            https://crates.io/crates/floem
      
         8. Vizia (7k / 700)
            https://crates.io/crates/vizia
      
      All of those options are technically superior to GPUI in my subjective opinion. GPUI focusses pretty narrowly on Zed's use case, and suffers from severe NIH syndrome (so has put a bunch of time and effort into building things that already exist as crates in the Rust ecosystem).

      GPUI does have a pretty nice component library. And of course an excellent code editing control. And it's... fine. But I wouldn't choose it over the other options.

      Replies (6)
      1. > GPUI does have a pretty nice component library.

        This is why people are flocking to it. Nothing else really matters.

        Replies (1)
        1. I disagree that nothing else matters. But I do agree that this is why people are flocking to it.
          Replies (1)
          1. Yes, nothing else matters _for adoption_, compare React.
            Replies (1)
            1. react doesn't have a native component lib

              Continue this thread (2 replies) →

      2. Iced has a lot of limitations. Just look at their roadmap. For example it doesn’t support text highlighting but maybe it does now.
        Replies (1)
        1. halloy uses iced and i can select text in halloy just fine...
          Replies (1)
          1. halloy custom built that, it's not part of iced proper - or at least it hasn't been historically.

            There was some rumblings PR-wise of it becoming a thing but I don't know offhand if it went anywhere.

      3. egui is probably worse technically (advocating for its use is like advocating for people to write their applications with imgui; it's good for game dev uis but please don't otherwise). iced is probably the best there?
        Replies (1)
        1. this kind of comment is such a meme at this point. imgui is perfectly fine for applications other than game debug menus. same with egui and other immediate mode ui frameworks. better, in fact, when you look at the state of pretty much every user interface written in a "proper, reactive ui library"
      4. How many of those have any compatibility with OS accessibility APIs? GPUI appears to have some support natively which is more than a lot of native Rust UI frameworks.
        Replies (2)
        1. egui, bevy ui, and some others are accessible. note that gpui or offshoots are not accessible at all, and neither are their vibeclones.
          Replies (2)
          1. Hello, I implemented the current accessibility APIs in GPUI (disclaimer: I am a zed employee). If you have a use case that's not supported, I'd love to hear about it. If you open an issue (or have already opened one) feel free to tag me (my github handle is cameron1024) and I'd love to look into it.

            It's not as polished as I'd like it to be, and use of the APIs in Zed isn't there yet, but if you feel it's "not accessible at all" I'd be interested to learn more.

      5. Iced, one of the top Rust GUIs, has a little less than 10 pages of documentation--that's it, that's ALL of it.

        In the past month 1 person has made commits.

        What does it matter if it's superior?

        Actually, AI has come into existence since I last looked at it, so maybe docs aren't needed anymore?

        Replies (2)
        1. I thought it was less. Page one is dedicated to “expect nothing,” as well.
          Replies (1)
          1. Which is 100% fair for the creator to say. It's also fair to be frustrated when an "expect nothing" project gets held up as one of the best GUI libraries in Rust (but this is not a frustration towards Iced's creator).
        2. It’s a one man project which yeah, does make it a bit brittle. But I am not sure that gpui docs are much better, and their governance structure brings its own concerns (bus factor for iced, VC culture for gpui).
      6. When I still wrote code by hand about a year ago, on Windows, all those crates didn't really work as expected, or weren't that easy—so many edge cases didn't really work and needed to be fixed: IME, CJK font, anti-aliasing, zooming, mouse event, and so on.

        GPUI, in fact, works quite well in most case.

    2. I have been trying to submit NSH on to HN. It is still early days but worth checking out.

      https://nsh.dev/

      Replies (1)
      1. This is incredible work.
    3. BlenderUI is a unbelievably fast ui and a young project with some potential, in their own words its "Twice as good as GPUI"

      https://github.com/ppmpreetham/BUI

      Some cool features (I guess coming from Blender) are builtin app menu search and Undo/Redo for UI fields.