Using relative Git paths in Cargo

I think I found a solution I can live with:

main/Cargo.toml

[dependencies]
common_data = "*"
...
[patch.crates-io]
common_data = { path = "sub/common" }

Same goes for the submodules:

main/sub/Cargo.toml

[dependencies]
common_data = "*"
...
[patch.crates-io]
common_data = { path = "ext/common" }
1 Like