MudEngine Part 10: Desktop with Blitz
Lint with Clippy
Adding dioxus-native pulled several subsystems into the build, so it's a good moment to make sure the tree is clippy-clean. The project sets [lints.clippy] in Cargo.toml, so cargo clippy must be zero-warning before you move on.
Run it from mud-engine/ (the crate directory):
cargo check
cargo clippy
The main.rs in this part has three #[cfg]-gated launch arms, and all three are compiled when you run the gates:
- Server binary —
#[cfg(feature = "server")](thedx servebuild) - Web client —
#[cfg(all(not(feature = "server"), target_arch = "wasm32"))] - Native client —
#[cfg(all(not(feature = "server"), not(target_arch = "wasm32")))]
Clippy checks the arms reachable for the default target, so keep all three tidy: no dead code in the use statements, no unused imports, and the builder chain on launch_cfg stays readable.
The style honours what Parts 7-9 already taught: cargo clippy runs from the crate root with no extra flags, and a clean tree is part of the definition of "done" for every part.
cargo clippyCargo.toml in mud-engine/ sets:
[lints.clippy]
That makes Clippy run as part of cargo check/cargo build too. Keeping cargo clippy at zero warnings means the workspace stays consistent for whoever picks the project up next — including the next part of this workshop.