pub fn configure_generated_crate_compilation(command: &mut Command)Expand description
Configure a Cargo invocation that compiles one of WaterUI’s generated crates.
Incremental compilation is off for every one of these builds, unconditionally.
-C incremental is part of a unit’s profile, the profile feeds Cargo’s -C metadata,
and -C metadata is mangled into every symbol name. Two builds in the same flow that
disagree about incremental therefore produce runtimes whose symbols cannot resolve
against each other: a preview support app built one way and a preview module built the
other share a libwaterui_dylib.dylib filename and roughly 33,000 mismatched symbols,
and the module fails to dlopen on a missing generic instantiation.
The choice is unconditional precisely so it cannot depend on an environmental accident
such as whether a machine has sccache installed. Little is given up: every generated
backend builds into one shared target directory where Cargo already reuses each unit’s
compiled artifact across backends and feature variants — while an sccache entry,
which requires incremental to be off, covers what that sharing cannot.