Summary
Add an opt-in WinUI 3 / Fluent rendering backend for Windows, selectable via --target windows-winui, alongside the existing Win32/GDI backend (crates/perry-ui-windows).
Motivation from discussion #3486: the current Win32/GDI output looks dated (boxy, flat, no animation, Win7-era controls). WinUI 3 brings Fluent Design — rounded corners, Mica/Acrylic materials, smooth animations, modern typography, crisp auto-DPI — and is the closest Windows analog to our iOS/Android look-and-feel.
Scope / decisions
- Opt-in, not the default. WinUI 3 requires the WinAppSDK runtime + an MSIX/bootstrapper packaging story, which conflicts with Perry's single-native-
.exe model. Keep Win32 as the default target; expose WinUI via --target windows-winui. Mirrors how we ship multiple Apple targets.
- No new "UI framework" dependency confusion:
microsoft/windows-rs (already a dep, windows = "0.58") is the WinRT projection crate, not a UI lib. WinUI from Rust = driving WinAppSDK + XAML through the WinRT projections (imperative XAML object trees in Rust).
- Drop Win7/8/8.1 as a floor for this target; no XAML Islands (kludge). WinUI 3 targets Win10 1809+/Win11.
Work breakdown (rough)
- New crate
perry-ui-windows-winui (or a feature on the existing crate) wiring WinAppSDK + Microsoft.UI.Xaml projections.
- Target plumbing:
--target windows-winui through the compile/link pipeline; bootstrapper/runtime acquisition (Microsoft.WindowsAppRuntime.Bootstrap).
- Widget mapping layer: map the perry-ui widget set (~40 widgets) onto XAML controls (Button, ListView/ItemsRepeater, NavigationView, TextBox, etc.).
- Window chrome: Mica/Acrylic backdrop, Fluent title bar, theme (light/dark/system).
- Packaging: MSIX or sideload-friendly unpackaged WinAppSDK bootstrap; document the runtime dependency.
- Geisterhand
apply_style dispatcher for the WinUI backend (parity with macOS/GTK4/Win32).
Acceptance
--target windows-winui produces a runnable app rendering the ToDo sample with Fluent chrome (Mica, rounded corners, animated controls).
- Win32 remains the default and unaffected.
- Docs cover the WinAppSDK runtime requirement and how to choose backends.
Tracks discussion #3486. Companion near-term Win32 polish: see the linked Win32 Fluent-polish issue.
Summary
Add an opt-in WinUI 3 / Fluent rendering backend for Windows, selectable via
--target windows-winui, alongside the existing Win32/GDI backend (crates/perry-ui-windows).Motivation from discussion #3486: the current Win32/GDI output looks dated (boxy, flat, no animation, Win7-era controls). WinUI 3 brings Fluent Design — rounded corners, Mica/Acrylic materials, smooth animations, modern typography, crisp auto-DPI — and is the closest Windows analog to our iOS/Android look-and-feel.
Scope / decisions
.exemodel. Keep Win32 as the default target; expose WinUI via--target windows-winui. Mirrors how we ship multiple Apple targets.microsoft/windows-rs(already a dep,windows = "0.58") is the WinRT projection crate, not a UI lib. WinUI from Rust = driving WinAppSDK + XAML through the WinRT projections (imperative XAML object trees in Rust).Work breakdown (rough)
perry-ui-windows-winui(or a feature on the existing crate) wiring WinAppSDK + Microsoft.UI.Xaml projections.--target windows-winuithrough the compile/link pipeline; bootstrapper/runtime acquisition (Microsoft.WindowsAppRuntime.Bootstrap).apply_styledispatcher for the WinUI backend (parity with macOS/GTK4/Win32).Acceptance
--target windows-winuiproduces a runnable app rendering the ToDo sample with Fluent chrome (Mica, rounded corners, animated controls).Tracks discussion #3486. Companion near-term Win32 polish: see the linked Win32 Fluent-polish issue.