SH2104: The rules depend on a screen, device or tool crate
Class: content, exit code 1.
shuyi lint ran cargo tree on the rules crate (shuyi.ron's
rules), and a crate the rules never depend on is under it, directly or
through another crate: the engine's screens, backend or tools
(shuyi-ui, shuyi-platform, shuyi-app, shuyi-cli), a window, input
or audio crate, or luck of its own (rand, getrandom). The rules stay
pure, as the rules crate's tests/layers.rs checks too.
How to fix it. Run the finding's command (cargo tree -p <rules> -i <crate>) to see the way in, remove that dependency from the rules, and
move the code that needs it to the game crate.
For example:
crates/rules/Cargo.toml: error[SH2104]: demo-rules depends on shuyi-ui: the rules stay pure, so screens, devices and tools go in crates/game, and the only luck is the SimRng kept in the state
see the way in: cargo tree -p demo-rules -i shuyi-ui