Workspaces for Monorepos
Cargo workspaces let you manage multiple related crates in one repository with a single Cargo.lock. Shared dependencies are deduplicated. This is the right way to structure a multi-crate project and it works out of the box.
Coming from CMake/vcpkg/conan, Cargo is a revelation. Let me count the ways.
Cargo workspaces let you manage multiple related crates in one repository with a single Cargo.lock. Shared dependencies are deduplicated. This is the right way to structure a multi-crate project and it works out of the box.
The Rust ecosystem is younger than npm or PyPI but the quality bar is higher on average. The combination of a good type system, clippy, and a culture of writing documentation (docs.rs generates docs from every crate automatically) means most crates are easy to evaluate and use.
Three commands and you have a new project, a build, and a passing test run. No CMakeLists.txt, no find_package incantations, no separate test runner. The Cargo.toml format is readable TOML and the lockfile is deterministic. This should not be impressive but it is.
Clippy is a linter with hundreds of rules, most of them genuinely useful. It catches performance issues, idiomatic Rust violations, and subtle logic bugs. Run it in CI with -D warnings (deny all warnings) and your codebase stays clean by default.