Always use workspace-level dependency declarations (`workspace = true`) rather than specifying exact versions in individual crates. This ensures consistency across your project, simplifies maintenance, and reduces the risk of version conflicts.
Always use workspace-level dependency declarations (workspace = true
) rather than specifying exact versions in individual crates. This ensures consistency across your project, simplifies maintenance, and reduces the risk of version conflicts.
When adding or updating dependencies:
Example:
- git2 = { version = "0.19.0", default-features = false }
+ git2 = { workspace = true, default-features = false }
or
- futures = "0.3.30"
+ futures = { workspace = true }
This practice centralizes dependency management at the workspace level, making updates and security patches easier to apply consistently across all crates.
Enter the URL of a public GitHub repository