Rusty Dialogs
Rusty Dialogs is a Rust library that provides a simple and cross-platform way to display native dialog boxes and notifications.
Dialogs
The library supports the following types of dialogs: MessageBox, FileDialog, TextInput, ColorPicker, and Notification.
Platform Support
See testreport.md for details on supported dialog types and features per platform and backend.
Windows
Win32-based legacy dialogs compatible with any COM apartment model.
By default, notifications use a tray icon with balloon tips.
Optional WinRT-Toast notifications are available on Windows 10 and later. (feature: winrt-toast)
Linux & BSDs
By default, executable-based backends (kdialog and zenity) are used.
Optional GTK3 and GTK4 backends are available with libnotify-based notifications. (feature: gtk3, gtk4)
XDG desktop portal support is also available, but limited to file and folder dialogs. (feature: xdg-portal)
macOS
By default, AppleScript-based dialogs are used.
Optional AppKit-based dialogs and notifications are also available. (feature: appkit)
Development
To check the code on all supported platforms, run the following command:
To test the Windows implementation on Linux, you can use the wine compatibility layer:
Testing
Use the interactive test runner example:
Run one dialog group directly:
The runner is interactive and will:
- Show what to click for each step
- Ask for retry on failures
- Print environment info (
rustc -V,cargo -V, OS, backend env)
Windows
Run the full test suite with:
Linux & BSDs
Run the full test suite with different backends:
RUSTY_DIALOGS_BACKEND=gtk3
RUSTY_DIALOGS_BACKEND=gtk4
RUSTY_DIALOGS_BACKEND=xdg-portal
RUSTY_DIALOGS_BACKEND=kdialog
RUSTY_DIALOGS_BACKEND=zenity
Run the full Windows test suite under Wine with:
macOS
Run the full test suite with backends:
Pull Request Template
Run at least one default run for your host OS, plus any backend/feature combinations touched by your PR, and attach the output/report in the PR.
License
Licensed under MIT License, see license.txt.
Inspired by tinyfiledialogs and rfd.
Contribution
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, shall be licensed as above, without any additional terms or conditions.