I obviously consider Druid to to be one of the most promising approaches, but even that aside there are other projects that could become a solid GUI toolkit, including Iced. I also encourage people to look at Makepad, as it does a lot of innovative things and emphasizes priorities such as small binary size and fast compile time.
In most orgs that I've been a part of, no language tends to meet the standard for consideration until it has been the core of at least one very large public software project.
A functioning GUI toolkit is likely a major barrier to that happening in Rust.
Until then, we know it exists but doesn't pass inspection for inclusion. So far the largest things we know of built with it are Servo's CSS engine and the NPM authentication service.
> So far the largest things we know of built with it are Servo's CSS engine and the NPM authentication service.
Here are some others, for your consideration:
* Dropbox's storage layer: https://dropbox.tech/infrastructure/extending-magic-pocket-i...
* CrosVM is an important part of ChromeOS https://chromium.googlesource.com/chromiumos/platform/crosvm...
* Firecracker is the underlying tech of AWS Lambda and Fargate https://firecracker-microvm.github.io/
* More coming from Amazon I don't have the ability to easily cite just yet, I hope the re:Invent recordings go up somewhere sometime soon
* "EdenSCM is the primary source control system used at Facebook,": https://github.com/facebookexperimental/eden
There's a bunch of other stuff too, of course. Apple has been hiring, but I don't think their usage is public yet. Microsoft is hiring rustc hackers, and has some other stuff going on. And tons of other stuff that may count as "large" depending on how you define it.
They are using quite a bit of Rust:
* The 1.1.1.1 app's core is in Rust (this is one of the most prominent, if not most prominent, usages of Rust on iOS/Android)
* Their HTTP/3 implementation is in Rust (I am very excited about this one, personally)
* Workers has multiple parts; the CLI, HTMLRewriter... (This was related to the team I worked on, so I have a soft spot for it)
... and probably more that I'm forgetting.
Honestly, it's really nice that there's so much Rust these days that it's easy to forget all of the cool stuff. And there's a lot that I'd consider meaningful that may or may not be "large," so I was shooting for only the largest. 1Password and Discord are huge for me, but maybe others don't think so.
Source: https://blog.cloudflare.com/how-we-made-firewall-rules/
Around this zircon component they built a set of higher level components. They'd still be considered important parts of an operating system. E.g. things like a bluetooth stack.
The SDK you mention is for end user programs targetting the OS.
What you're talking about is the SDK for people writing applications to run on top of Fuchsia.
The documentation on fuchsia.dev heavily references Rust, and there is even documentation for usage with FIDL. I don't see anything explicitly relegating Rust usage to the kernel or even drivers. Seems like anything is fair game and "official."
Is there another source you are referencing?
For the kernel: C, C++
For the rest of the OS: C, C++, Dart, Rust
For the "end-developers" (=regular app developers): C, C++, Dart
In fact, if you remove the kernel, Rust is the main language of fuchsia already.
The Iced project used as an example has a custom renderer for example... does it support VoiceOver? Does it support every standard Cocoa keyboard shortcut?
Rust wrappers for these existing libraries (some exist) that maintain all functionality is what would allow “world-class” apps to be built in pure Rust IMO.
Rust makes it easier to bind platform capabilities at a low level than most other languages. As an example, we do cut'n'paste cross-platform, supporting complex media types, not just plain text, so we can round-trip a vector glyph from Runebender to other font editors. I think that's a taste of being able to take on these more ambitious challenges.
Also, "native" UI toolkits are a lot less actually native than they used to be. On Windows, the old HWND-per-control and GDI drawing model (long considered the standard for "native" Windows UI) is long obsolete, and there are actually a whole bunch of toolkits that people use, with UWP the most actively supported. Apple has a stronger story, but even there you have AppKit + SwiftUI, and technically Catalyst is officially supported, though nobody would argue it's actually a good experience.
And the fact is, a lot of people are using Electron, because it actually solves the business problem of delivering good-enough UI. I think we have a good shot at competing against that niche, and also that building it on Rust is a more solid foundation than any other language ecosystem.
A sucessful Rust GUI also needs the likes Telerik, Component ONE and similar third party vendors with GUI component libraries.
I still can't think of a way to make borrow checker deal with a GUI designer and drag and drop of components(which should be able to be plugged anywhere on the visual tree), or even something like SwiftUI, without forcing Rc<RefCell<>> everywhere.
I am looking forward how Rust/WinRT will look like with WinUI, but again, COM means AddRef/Release everywhere.
one thing im having a hard time wrapping my mind around is, if swiftui depends on (please correct me if im wrong) the swift compiler itself and emited static type information from that compiler, how can rust build an interface to that easily?
it seems like you'd have to make some kind of wrapper lib that emits extern c interfaces that take and return `AnyView` and thereby hurting performance...?
https://github.com/microsoft/winrt-rs
But that is the easy part, the hard part is having the ability to plug a widget anywhere on the tree without triggering a bunch of lifetime errors. WinRT gets around this because it is built on COM, so you get reference counting no matter what.
but afaik with swift there is static type information encoded at the binary level that swiftui (e.g `some View`) utilizes to do type-based tree diffing, so i wondered how rust can generate that, even with macros...
maybe im mistaken though!
(thanks for the reply btw)
Companies want to reduce duplicated effort per platform, in order to make frontends faster and/or cheaper. That's the number one feature a toolkit can have.
I think doing this right will require some imagination, not just playing greatest hits from previous decades, only in a new language.