Loungy: An Application Launcher Written with GPUI, the Zed GPU UI Framework
github.com
github.com
Notes for people trying to run this:
- it is MacOS only
- the window bounds are hardcoded for my system, because GPUI lacks a way to center a fixed size window
- the accessibility is pretty much non-existent. GPUI doesn’t provide an accessible text input yet, so this is a hacky minimal implementation.
If there are any questions about this project or developing with GPUI, feel free to ask!
Pros:
- GPUI is heavily inspired by Tailwind, which made me productive pretty quickly.
- I love the tight coupling between the Rust structs and the rendering. Makes for nice and reusable components similar to Svelte.
- It's obviously purpose built for performance/latency and it shows. I haven't optimized Loungy at all, but it feels way smoother than the previous Tauri version.
Cons:
- GPUI is very obviously still in it's infancy. There isn't even a text input!
- There is no animation system. This is a huge drawback compared to CSS/Svelte
- There is no global hotkey API like in Tauri. But I could just take the hotkey crate by the Tauri guys and make it work for GPUI.
Could you elaborate on this part? As I recall, communication between webview and the node.js backend was my main gripe with Electron as well. Sounds like it hasn't been solved in Tauri.
The problem is that I want to do more in my launcher. Two examples:
- I wasn't happy with the official bitwarden extension, because going through the clipboard and copy/pasting individual items felt cumbersome. They also only supported one vault even though I asked about this years ago [0]! In raycast I wrote my own bitwarden extension that hooked into Hammerspoon and used the AX spoon to autofill credentials. That felt very hacky though so in my own launcher I am using the accessibility API directly through swift-rs.
- I wanted to build my own keyboard centric matrix chat client into raycast. I got pretty far, but in the end I was just too limited by the available components. Also I discovered that once your extensions heap reaches 100 MiB, it just gets killed. That basically made it impossible to just load the matrix-sdk including crypto.
In the end I just didn't want to keep investing time in some proprietary software that doesn't allow me to do what I want to do :)
The main heap management trick for matrix-js-sdk would be to turn on (experimental) sliding sync mode, which means that it only syncs the rooms it cares about - so O(1) with number of rooms, rather than O(N). However, i'm guessing you probably weren't testing with a large account?
Posting this primarily because I frequently run into people who use kde but have never used krunner.
As an extremely heavy Alfred user I'd love to see a fully open source alternative (Raycast is a full no for me due to the subscription). I'd definitely donate towards development if it gets a bit further along.
You can think of it like building a website with exclusively <div> <img> and <svg> :)
[0] "... we partnered with Nathan Sobo, co-founder of the Atom text editor, who had already started building a Rust UI framework that was loosely inspired by Flutter"
Edit: huh- i read that but the Cargo.toml does like Linux- maybe early
Edit 2: Looks in progress https://github.com/zed-industries/zed/issues/7015
If there are going to be breaking changes, I can live with that as this is not a commercial project.
Nice to see that it apparently has accessibility support.
now imagine if zed embedded a scheme instance for writing plugins....
GPUI, by all indications, looks like it's potentially got legs as a UI framework - the team behind it seem driven and I overall do like their approach. I'm not downing on GPUI and I do hope it succeeds, let's just avoid the hyperbole.
Managing to break Rust's cross-platform compatibility is no small feat! "congrats".
Neither GUI, nor application paths and standards are built in to rust.
I’m as critical of the rust fanboyism as anyone. I don’t see a specific purpose for this app that, as far as I can tell, already exists and is built in to MacOS, indicating that it’s an example being “upvoted for rust” (not saying “don’t build things”. Practice and fun are perfectly valid reasons to build something that exists). But you could at least bring valid points.