EDIT:
Holy sh*t, they actually have bindings for each OS and built a Rust abstraction on top of that. That's pretty wild
https://github.com/zed-industries/zed/blob/main/crates/gpui/...
EDIT:
Holy sh*t, they actually have bindings for each OS and built a Rust abstraction on top of that. That's pretty wild
https://github.com/zed-industries/zed/blob/main/crates/gpui/...
I grew up developing Windows apps using the native Win32 API:s, and there was nothing particularly daunting about it. Using what the OS provides shouldn't be considered such an outlandish idea, and being scared of it is causing stagnation and waste (looking at you, Electron). The code here is only a couple of thousand lines per platform; surely only a small fraction of the entire code base.
I've looked into native Linux development a few times, for example, and haven't even been sure what's the best toolkit to use. It feels like you'd have to invest quite a lot in a particular toolkit to even see if it can do what you need, coming fresh from web dev like a lot of people who go for Electron obviously are (myself included).
Linux is kind of a special case because its ancient ancestry and open philosophy means it doesn't offer standard UI components at all (and with Wayland, there's not even a standard API for creating windows). You either draw the pixels yourself on the screen or you use some library for it. But if you're targeting primarily KDE you would use QT, and if you target primarily Gnome you use GTK.
With MacOS and Windows there is a rich set of standard UI controls implemented by the OS, that ensure integration with the OS and a consistent look & feel. When you use a webview you lose all that.
We’ve slowly been building out gpui to be super ergonomic and fluid for us to build the kind of UI we need to.
As a designer that just picked up Rust last February it’s been really nice to have something that is so comfortable to work with without compromising our performance goals.
Let us know if so - they should just work™, but would love to know if that is not the case.