#4623·rerun

Reduce the number of crate binaries in the cargo workspace

Author: emilkCreated Dec 26, 2023Updated Sep 7, 2026
Labels🧘 kaizen

cargo check etc currently checks all our binaries, which is a lot, because it includes all examples, all doc-tests, and all roundtrip tests. This also makes rust-analyzer slower because of this issue:

$ cargo run --bin 2>&1 | wc -l 99 55


One solution would be to split off examples and tests to its own workspace.

They should ideally be under its own folder then, but I'm not sure what that should be called. Or we use many separate workspaces (one for docs, one for examples, one for tests, etc). Either way we need to make sure all the workspaces are checked on CI (cargo fmt, cargo cranky, …), which is annoying, because it may require duplicating Cranky.toml, clippy.toml, etc.


Another approach is to combine all existing binaries into one: