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 respository] is 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 share a single set of dependencies, and therefore have a single target directory and a single Cargo.lock.

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