Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Winio
Winio is a single-threaded asynchronous GUI runtime.
The GUI part is powered by native backends, and it is compatible with compio.
All IO requests could be issued in the same thread as GUI, without blocking the user interface!
Platform support
| Backend | Platform |
|---|---|
| Win32 | Windows 10 1703+ Windows 10 1809+ (windows-dark-mode) |
| WinUI | Windows 11 21H2+ WinUI (3) 1.0+ WinUI (3) 1.2+ (media) |
| Qt | Qt 5.15+ Qt 6.0+ |
| GTK | GTK 4.14+ WebkitGtk 6 2.42+ (webview) |
| AppKit | macOS 11.0+ |
| UIKit | iOS 13.0+ Mac Catalyst 13.1+ |
| Android | Android SDK 36+ Android NDK 27+ |
[!WARNING] On systems other than macOS, iOS, and Android, you have to select only one backend by enabling features. The default one is
win32for Windows andqtfor others.
[!WARNING] WGPU canvas doesn't work well on some platforms:
- iOS simulator
- Mac Catalyst
- Android simulator
- Qt
- GTK
Example
Read the example and learn more!
| Backend | Light | Dark |
|---|---|---|
| Win32 | ![]() |
![]() |
| WinUI 3 | ![]() |
![]() |
| Qt 6 | ![]() |
![]() |
| GTK 4 | ![]() |
![]() |
| AppKit | ![]() |
![]() |
| UIKit (Mac Catalyst) | ![]() |
![]() |
| UIKit (iOS) | ![]() |
![]() |
| Android View | ![]() |
![]() |
Quick start
[!NOTE] Alternatively, a fully configured template is available as a starting point.
Winio follows ELM-like design, inspired by yew and relm4.
The application starts with a root Component:
use *;
It is recommended to set the lib name to "main" for convenience.
[]
= "main"
All platforms except Android start with main. You should add the code below to main.rs:
[!NOTE]
WindowEvent::Closewill never be emitted on iOS, and the application will exit if the window (Mac Catalyst) or the app (iOS) closes.block_ondoesn't return in that case.
The Android entry point is the android_main method:
use *;
use crateMainModel;
[!NOTE]
android_mainmight be called multiple times, but the lifetime of each calling don't overlap.android_mainruns on a dedicate thread, while all code ofwinioexecute on the main thread.- You have to do the following to create a complete Android project with
winio.
Integrate into an Android app
To integrate the winio app into an Android app with id "rs.compio.winio.example", the main activity should inherit rs.compio.winio.Activity:
;
;
Add the following to the <activity> section of AndroidManifest.xml:
Put the project folder "android" beside the "src" folder of the rust project, and modify the "dependencyResolutionManagement" part of android/settings.gradle
dependencyResolutionManagement
// ...
def dependencyText = providers.exec .standardOutput.asText.
def dependencyJson = new JsonSlurper().
def manifestPath =
return new File(manifestPath.parentFile, "maven").path
}
and gradle/libs.versions.toml
[]
# ...
= { = "compio:winio", = "latest.release" }
and android/app/build.gradle
dependencies
.each















