Are cargo workspace members packaged into a crate?


#1

I have a project and few workspace members specified in the Cargo.toml. Will they be packaged into a crate when I package it?


#2

No, each individual crate needs to be published individually.


#3

How do path = dependencies work for crates in a workspace when the package is published?


#4

AFAIK cargo refuses to publish such crates.


#5

@newpavlov, I’ve published crates which specify a dependency by version and by path.


#6

The published crate will only use the dependency by version, ignoring any path.


#7

You specify both a path and version: https://github.com/sfackler/rust-openssl/blob/master/openssl/Cargo.toml#L24