Hello,
My application has multiple binaries, and multiple libraries, so I created a top level workspace.
|-- Cargo.toml
|-- src
| |-- bin1 (contains a `Cargo.toml` and rust files)
| |-- bin2 (contains a `Cargo.toml` and rust files)
|-- lib
|-- libA (contains a `Cargo.toml` and rust files)
|-- libB (contains a `Cargo.toml` and rust files)
libA
is a library that I wrote, while libB
is a library that I cloned from github (I have a few modification that cannot be upstreamed as-it). It works well. My top-level Cargo.toml
is:
[workspace]
members = [
"src/bin1",
"src/bin2",
"lib/libA",
"lib/libB",
]
But then I wanted to vendor petgraph that itself uses workspace
. When I cloned it into the lib
directory, and run cargo check
from the top-level directory, I got the following error:
error: multiple workspace roots found in the same workspace:
/home/rmoussu/dev/tour-generation/tour_generation/lib/petgraph
/home/rmoussu/dev/tour-generation/tour_generation
How can I vendor library crates that uses workspace if I'm using workspace myself?
EDIT: I found this issue on nested workspace but I'm even more confused. If I understand correctly it's not possible to have nested workspace?