Cargo workspaces for multi-package projects

Minimum Rust version: 1.12

Cargo used to have two levels of organization:

  • A package contains one or more crates
  • A crate has one or more modules

Cargo now has an additional level:

  • A workspace contains one or more packages

This can be useful for larger projects. For example, the futures packageis a workspace that contains many related packages:

  • futures
  • futures-util
  • futures-io
  • futures-channel

and more.

Workspaces allow these packages to be developed individually, but they sharea single set of dependencies, and therefore have a single target directoryand a single Cargo.lock.

For more details about workspaces, please see the Cargo documentation.