105 points EvilGoose 3 hours ago 24 comments

rudedogg 2 hours ago | parent

It would be better to call it zgpui, zed-gpui, or Dear GPUI.

I feel like naming a library after either GPUI/GPUGUI make talking about this technique difficult. And the technique didn’t originate in this library.

nextaccountic 9 minutes ago | parent

But this isn't called gpugui. Gpui is a given name, it doesn't describe any specific technique

okasaki 2 hours ago | parent

> GUI

> No screenshots on web site, docs, or repo

thrance 1 hour ago | parent

I could have sworn I saw some kind of portfolio page not too long ago, with screenshots from different projects using gpui. Can't seem to find it anymore.

nixpulvis 1 hour ago | parent

It's clearly not ported over yet...

giancarlostoro 2 hours ago | parent

Finally, I have wanted to use it but felt awkward that it was inside the editors repo.

nixosbestos 2 hours ago | parent

Wasn't it once a separate repo, then they vendored it, and there's a community fork? I wonder what will happen with it?

ref: https://gpui-ce.github.io/

edit: lmao downvotes for this? what even is this community anymore?

Ciantic 1 hour ago | parent

It was not maintained, there was also "gpui-kit" and "gpui-unofficial" which builds on the official repo. [1] Nobody will mourn for community fork. Having one official repo brings so much clarity.

[1]: https://github.com/iamnbutler/gpuikit, https://github.com/gpui-archipelago/gpui-unofficial

nixosbestos 1 hour ago | parent

Yeah, it's definitely a signal, too. I'm excited.

yedpodtrzitko 1 hour ago | parent

there's also https://github.com/longbridge/gpui-fast which seems to be pretty active. I wonder if they'll upstream their changes.

slopinthebag 1 hour ago | parent

it's not just this community, it seems like it's the entire internet. everyone is either ragebating or butthurt. i cannot imagine what goes through someone's head to downvote your comment - i imagine mostly nothing.

throwaway69123 1 hour ago | parent

The licence makes using it pretty useless, I wonder if they will change stance on this. Context https://github.com/zed-industries/zed/blob/main/crates/ui/LI... the ui elements themselves are under a really restrictive licence.

nextaccountic 7 minutes ago | parent

I'm eager for a GPL resurgence in libraries. Copyleft is the opposite of restrictive

slopinthebag 1 hour ago | parent

i'm confused why gpui get's so much attention; it's not fast, it's not accessible, it's not ergonomic, and it's not beautiful. there are more mature options in the rust space. what gives?

hmokiguess 1 hour ago | parent

can you share those options? curious about your take

slopinthebag 45 minutes ago | parent

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.

Klonoar 23 minutes ago | parent

Cosmic runs a fork of iced, not iced proper.

devilsdata 55 minutes ago | parent

What else would you recommend? egui?

nicoburns 27 minutes ago | parent

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.

Klonoar 24 minutes ago | parent

> GPUI does have a pretty nice component library.

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

nicoburns 21 minutes ago | parent

I disagree that nothing else matters. But I do agree that this is why people are flocking to it.

bendangelo 18 minutes ago | parent

Iced has a lot of limitations. Just look at their roadmap. For example it doesn’t support text highlighting but maybe it does now.

katdork 11 minutes ago | parent

halloy uses iced and i can select text in halloy just fine...

katdork 12 minutes ago | parent

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?