Skip to content

Add opt-in WinUI 3 (Fluent) Windows target: --target windows-winui #4680

Description

@proggeramlug

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)

  1. New crate perry-ui-windows-winui (or a feature on the existing crate) wiring WinAppSDK + Microsoft.UI.Xaml projections.
  2. Target plumbing: --target windows-winui through the compile/link pipeline; bootstrapper/runtime acquisition (Microsoft.WindowsAppRuntime.Bootstrap).
  3. Widget mapping layer: map the perry-ui widget set (~40 widgets) onto XAML controls (Button, ListView/ItemsRepeater, NavigationView, TextBox, etc.).
  4. Window chrome: Mica/Acrylic backdrop, Fluent title bar, theme (light/dark/system).
  5. Packaging: MSIX or sideload-friendly unpackaged WinAppSDK bootstrap; document the runtime dependency.
  6. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is neededrfcProposal that needs design agreement before implementationtriagedMaintainer reviewed; type, scope, and next step are clear

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions