#Setting multiple package versions to specified version in workspace?
6 messages · Page 1 of 1 (latest)
Rust has supported workspace level dependency inheritance since 1.64.0,
https://blog.rust-lang.org/2022/09/22/Rust-1.64.0.html#cargo-improvements-workspace-inheritance-and-multi-target-builds
https://doc.rust-lang.org/cargo/reference/specifying-dependencies.html#inheriting-a-dependency-from-a-workspace
Thats for dependency versioning, which is not what I am walking about. Image a folder called engine that is the workspace folder. Beneath is another folder called core and another called foo, which are both packages I am working on in the workspace. I want each package I am working on to have the same versions all the time and I want to know if there is some way to set all their versions in one place and have them inherited.
If you specified the dependency version at the workspace level, then inherited the dependency for the crate from the version specified in the workspace, surely the crate would then have the same version...??
So in the Cargo.toml file for the workspace, you specify dependencies under the [workspace.dependencies] table...
Then, in the Cargo.toml crate for the crates in the workspace, you specify the workspace = true key for a dependency, so the crate inherits the version specified in the workspace...
After doing some research I cant do what I want to do. I think you keep thinking I am talking about third party dependency stuff, which Is not what I wanted. Underneath [Package] you specify a version. I wanted to see if setting that version implicitly through the workspace was possible.