Skip to main content

run

Function run 

Source
pub fn run(release: bool) -> Result<(), String>
Expand description

Run the typo and TOML checks, clippy twice, the doc build, then the formatting check.

The two checks that need no compiler go first, so a misspelling or an unsorted feature table costs a second rather than the minutes clippy takes.

Clippy next: its warnings and the diagnostics it raises may leave the tree in a state rustfmt would rewrite, so formatting is the last word. The doc build sits between the two because a rustdoc warning is a lint like clippy’s — it should fail here rather than only in CI — while a doc comment it would rewrite is still rustfmt’s to settle.

Clippy runs twice, because each compiles a different set of code: the library crates with no default features at all, and the whole workspace with every feature, which is what the doc build and the full test run compile.

The no-features pass is the one the test run cannot stand in for. Those crates’ built-in backends are optional, so this is the combination that proves the general facilities stand on their own — and the one a false optional feature, whose dependants never really compiled without it, fails to compile. The crates are named one by one rather than picked with --workspace, because --no-default-features reaches only the packages the command names: for every other package the features come from the dependency edges that reach it, and feature unification applies all of them. Every application crate asks unlit3d for ui and winit, so a workspace-wide run would compile the libraries with exactly the backends this pass exists to leave out.

Every run denies warnings, as CI does. Without it a warning here is a warning CI turns into an error, which is the same gap in a different guise.