Skip to main content

waterui_cli/winui/
toolchain.rs

1//! `WinUI` toolchain checking.
2
3use crate::toolchain::{Host, Toolchain, ToolchainError, rust::RustToolchain};
4
5/// `WinUI` toolchain checker.
6///
7/// The `WinUI` backend builds a plain MSVC-target Rust binary and stages the
8/// Windows App Runtime self-contained, so its only host requirements are a
9/// working Rust toolchain and Windows itself. The host check is a compile-time
10/// gate in the callers; this checker verifies the Rust side.
11#[derive(Debug, Clone, Copy, Default)]
12pub struct WinUiToolchain;
13
14impl Toolchain for WinUiToolchain {
15    type Installation = <RustToolchain as Toolchain>::Installation;
16
17    async fn check(&self, host: &Host) -> Result<(), ToolchainError<Self::Installation>> {
18        RustToolchain::default().check(host).await
19    }
20}