Personal review for rust GUI frameworks
I created few tools with some rust GUI frameworks recently, wanna share with you guys about my experiences and opinions.
My requirement is:
- Small package size, better be zero dependency.
- Cross platform support.
- Cross build support (use macOS to build for windows in my case).
- Cross platform IME integration and unicode character support.
dioxus (https://github.com/DioxusLabs/dioxus)
It's my main framework at this point. I really like the react style architecture.
The major reason to choose it rather than tauri is, I don't have to write html + js + css, all UI creation could be done in pure rust, and the code is very short and clear.
My tech combination is dioxus + fermi + tailwindcss + daisyui. Could create very good look-and-feel application in a short time.
Overall experience:
- Good
Pros:
- Small package size, usually 2MB
- Mature frontend technology and ecosystem
- Fermi provides a good global state management solution, I don't have to deal with complex life time issue
Cons:
- Depend on webview2 component, some old system might not has it by default
- Cannot cross build from macos to windows, it has to be built with msvc toolchain, otherwise I have to ship the package with webview2loader.dll with it
- Kind of in-active development, author seems slowed down
slint (https://github.com/slint-ui/slint)
It creates a new UI declarative language called "slint", and provides LSP for it, creating UI with it is very joyful.
It is not mature at this point, but it has a commercial company with very active development, I will keep tracking it, but will not use it as my main framework right now.
Overall experience:
- Will be good in future
Pros:
- Very small package size, 1MB with zero dependency
- Cross platform and cross build support
- Good IME integration and unicode character support
- Declarative UI creation with \
slint\\language, simple and effective - Good default look and feel (I prefer fluent dark theme)
- Active development
Cons:
- Layout mechanism is immature, like Grid Layout doesn't support for loop, doesn't has flex layout
- Some controls are not product ready, like TextEdit has poor performance with large amount of text
egui (https://github.com/emilk/egui)
I will use it to create very simple tool.
Overall experience:
- Medium
Pros:
- Medium package size, 3MB with zero dependency
- Cross platform and cross build support
- Good IME integration
- Good default look and feel
Cons:
- Has to manual load font to support unicode
- Code could become verbose for complex UI and life time management will be hard
- In-active development