HN Companion◀︎ back | HN Companion home | new | best | ask | show | jobs
GPUI is getting its own repository (github.com/zed-industries)
386 points by EvilGoose 3 days ago | 100 comments


I've been blown away by how rich the gpui-kit componentry is: https://gpui-kit.com/component/ I recently wrote a Rust desktop app using iced, and now look at gpui[-kit] with envy ;)

I love GPUI and GPUI-Kit, I think what make GPUI attractive is the Kit components. I've been building the desktop apps around it and love the result so far: https://gpui-kit.com/apps/vtcode/

You should check the apps/programs made with it too. There are many good apps/programs.

https://github.com/zed-industries/awesome-gpui


But thats mostly dev-tooling

And one of them is future version of Discord.

Looks almost identical to this C library

https://yappologistic.github.io/CUI/


did you try BUI? https://bui.preetham.top/


I've built two desktop apps with GPUI-kit and absolutely love the end results. No regrets.

I used gpui-kit it as the framework to build Cassava (https://cassava.dev/) and I've been thrilled with both its performance, but also the ease with which LLMs are able to develop fairly robust UIs. Keeping the language of the web has (I think) dramatically improved its accessibility to language models.

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

Heck yeah! Thank you so much, Zed team!

We're looking forward to using this at ArtCraft. We've already forked egui (and we're going to try to upstream our work). Even so, we find lots of things we cannot use egui for.

GPUI is essential for some of the work we're doing.


I'm fascinated by the ArtCraft project. I'm curious how the project handles software architecture / design while using agents.

what can’t you use egui for?

> GUI

> No screenshots on web site, docs, or repo


Exactly.

If you are posting a GUI product of any kind.

Put together a demo.

And then, put the link right at top where everyone can find it. Not buried in a help document on page 66.

I know they have one, i've seen it. Couldn't say how to find it again.


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.

Were you thinking of their awesome list for it maybe? I stumbled upon it browsing Zed’s repos and it’s full of happy tinkerers!

- https://github.com/zed-industries/awesome-gpui


It's clearly not ported over yet...

I mean the repo also has literally no content yet... I'm sure it's coming. Despite the title of this HN post, this isn't an announcement from Zed, it's just a random third party noticing that Zed created a GPUI repository and linked to it.

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?

It's from a VC-funded company. I don't understand the mechanism, but VC-funded software tends to dominate in social media attention and online discussion when introduced.

Its because a VC is going to throw at least some money at marketing.

You'd be surprised what throwing just 1 or 2 people at marketing can do to get visibility.

Compared to just a group of engineers crunching out code.

The group of engineers might be building something great, but its just a tree falling the forest. Nobody hears it. You have to spend some time broadcasting it, making demo's, posting about it.


I think it's because a project with funding is going to have progress and at least some community. If people are being paid to work on it, they probably have time and care to do things.

I don't know anything about <other_open_source_Rust_GUI>, but I expect the documentation to be half-baked, and if I look at the GitHub repo the most recent activity is going to be somebody who made a bug report 6 weeks ago and nobody has responded to it yet.

The team behind the software matters and a team with funding is appealing.


Heavy discovery channel efforts. Search, socials, llms...

Article[0][1] from yesterday mentions this.

TL;DR: (about a16z VC company) "a media company that monetizes through VC".

One of the article's themes was that it's about hockey stick growth, winner takes all mentality. Startups that win aren't necessarily first or best - often they just outspent others in PR and marketing department (especially to hype their IPOs).

[0] https://www.oreilly.com/radar/what-happened-to-silicon-valle...

[1] https://news.ycombinator.com/item?id=50602947


GPUI kit is the only UI framework that is accessible, actually. And it is fast. Beautiful is irrelevant as you can style it however you like. It can do nice smooth animations if you want too. There is also gpu-fast that fixes some important performance issues.

edit: Slint has good accessibility support too, but it's commercial for commercial projects.


Slint is free of charge for commercial desktop projects. Slint is under multiple licenses. The GPL makes it open source, the royalty free license makes it free of charge on desktop and mobile, only proprietary embedded projects need a commercial license.

nothing you say is true.

I built myself a basic music player with gpui, and aside from not having used gpui-fast myself, I agree with everything they said. What are you basing your claim on?

I think one reason is because it's used by a widely used application in production. A good UI framework has to handle a lot of complex edge cases, and it's easy to trust that it's up to the task.

There is accessibility, but it’s not fully baked. I’m currently building something with it, using Claude and Deepseek, and one of my requirements was accessibility… I forget the specifics, it’s either missing references in the docs or on main. Either way, Claude found it and I told Claude it would have to implement anything missing. It took about a week, and used my entire quota that week, but everything seems to be good at this point.

Thus far, it has also been quite fast hitting my performance targets which were also quite aggressive. The only real issue I’ve had is memory usage is higher than I’d like but it’s still 1/3rd of what I’d get if I was using Electron… and if I’m remembering right it’s mostly because of the driver stack.

I need to figure out what I plan on doing with the app when this first version is finished: open sourcing it, charging for it, or some combination of the two. Though I can’t imagine not trying to upstream or release the accessibility work.


Hi, I implemented the accessibility support in GPUI (disclaimer: I am a zed employee). If you have patches for missing features, I'd love to get them upstreamed. Feel free to tag me on github (username is cameron1024) if you have any and I'd be happy to take a look.

What else would you recommend? egui?

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.


> GPUI does have a pretty nice component library.

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


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

Yes, nothing else matters _for adoption_, compare React.

react doesn't have a native component lib

The GPUI components lib isn't from the original authors of GPUI. It was a third party thing by Longbridge that's since grown.


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

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

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.


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.


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.


egui, bevy ui, and some others are accessible. note that gpui or offshoots are not accessible at all, and neither are their vibeclones.


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.


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?


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).

I thought it was less. Page one is dedicated to “expect nothing,” as well.

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).

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?

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"

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

https://nsh.dev/


This is incredible work.

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.


can you share those options? curious about your take

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.


egui is immediate mode. That rules it out for reasonable performance for complex apps.

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

not true at all. If anything imgui’s scale better for complex apps

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.


egui is designed for english only game dev tools. It is not remotely mature for actual tools that support CJK, IMEs, and accessibility

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...

Context menu fails, that's literally where all the OS integration happens.

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.


Cosmic runs a fork of iced, not iced proper.

I don't really understand the negative views towards egui in this thread. It works great. In my spare time I've been building an open source little harness thing ( https://www.byob.chat/ ) as a fun side project and egui is an absolute blast when it comes to functionality. It so far has behaved as an open canvas, I can press F2, and click and drag any components on my native desktop app to rearrange them, I can also theme it with anything, including live shaders.

There are three negative comments about egui (two when you posted), all pretty specific so you can investigate them further.

I've been modding the ever living daylights out of https://herdr.dev/ which uses GPUI the past few weeks and it's just incredible how flexible and performant it is. I've never had a desktop app that I can just reconfigure and rebuild into my own preferences live before and it's a new level of flexibility that I can't imagine giving up now that I've tried it.

I'm running nightly performance benches between all recent heard-off GUI frameworks. It measures the same looking picture with stress test for immediate and retained modes separately.

(Feel free to PR if you want to add another one or fix some non optimal implementation)

https://samoylenkodmitry.github.io/Cranpose/?tab=performance


Your website is slop on mobile just FYI

I know this helps lots of people but very strange that it wasn't by default.

It started out as a GUI library made by the Zed developers for Zed. An implementation detail, more or less.

Been vibe modding zed to get some additional functionalities, three bucks of ds 4.1 have yielded not only something essentially perfect visually AND incredibly fast.

Didn't GPUI as a separate component stop existing a few months ago, necessitating a community fork? Am I confusing something?

Yes, this is them reversing that decision and making it a standalone project.

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.


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

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?


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


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

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

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.

You're supposed to say: "yay i'm happy for it!" to get upvotes.

It's hard, unintuitive, has limits in unexpected places. I'd consider this a very alpha quality framework.

Haven't they said this before and just a few weeks or a month later pulled the plug on that?

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.

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

I very much disagree. Not everyone wants to be forced to give their source code to the world, which is what GPLing your library does. Use the MPL if you want that -- at least then the virus-ish nature of the GPL is contained to your library and doesn't force your ideals onto everyone else. This is, IMO, particularly bad for libraries like this one where the ones that are accessible with assistive technology are very limited.

> I very much disagree. Not everyone wants to be forced to give their source code to the world, which is what GPLing your library does.

This is not true. Nobody is forced to give their own source code to the world, because nobody is forced to use a GPL library. Proprietary software can just not depend on a specific GPL library, just like free software can just not depend on a proprietary library

Using a GPL library is quid pro quo: you receive a free software library, and you give back a free software application. If you don't believe in sharing code, you can just write eveything yourself (and hey, now with AI agents this is much more practical)


If this was true explain the logic of releasing the platform of GPUI under a different licence that allows more commercial applications.

You should check out BUI, it's fully GPL! :)

You linked to the zed UI, gpui itself is Apache

Yes I know, my statement clearly says that.

Useless for corporations, sure. Open source projects can use it just fine.

GPL opensource projects