Workspaces
When the code base is getting larger, you might need to work on multiple crates on the same project. Rust supports this via Workspaces. You can build, run tests or generate docs for all crates at once by running cargo
commands from the project root.
⭐️ When working on multiple crates same time, there is a higher possibility to having shared dependencies on crates. To prevent downloading and compiling the same dependency multiple times, Rust uses a shared build directory under the project root, while running cargo build
from the project root.
🔎 rust-lang/rust source folder is a good example for a workspace.
Last updated