I've been reading Cargo Workspaces - The Rust Programming Language and I have a question. I have used workspaces plenty of times for my own internal/unpublished projects, but I have never published a workspace'd crate.
From the aforementioned page:
If you publish the crates in the workspace to crates.io, each crate in the workspace will need to be published separately.
As far as I can understand, one of the points of workspaces is to allow using workspace-relative crates such as foo = { path = "../foo" }
, but publishing a crate with a relative dependency seems like a bad idea .. unless, of course, publishing a crate within a workspace always uploads the entire workspace, and the reason one needs to publish each crate is to basically create some kind of "anchor" which crates.io will actually index as a crate.
So basically my question is: Is that how it works? Does publishing a crate within a workspace cause the entire workspace to be uploaded [so that relative dependencies get properly resolved]?