diff --git a/src/doc/src/reference/workspaces.md b/src/doc/src/reference/workspaces.md index 881658a0b77..97472e352bd 100644 --- a/src/doc/src/reference/workspaces.md +++ b/src/doc/src/reference/workspaces.md @@ -3,7 +3,10 @@ A *workspace* is a collection of one or more packages that share common dependency resolution (with a shared `Cargo.lock`), output directory, and various settings such as profiles. Packages that are part of a workspaces are -called *workspace members*. +called *workspace members*. There are two flavours of workspaces: as root +package or as virtual manifest. + +### Root package A workspace can be created by adding a [`[workspace]` section](#the-workspace-section) to `Cargo.toml`. This can be added to a @@ -11,11 +14,15 @@ section](#the-workspace-section) to `Cargo.toml`. This can be added to a the *root package* of the workspace. The *workspace root* is the directory where the workspace's `Cargo.toml` is located. +### Virtual manifest + Alternatively, a `Cargo.toml` file can be created with a `[workspace]` section but without a [`[package]` section][package]. This is called a *virtual manifest*. This is typically useful when there isn't a "primary" package, or you want to keep all the packages organized in separate directories. +### Key features + The key points of workspaces are: * All packages share a common `Cargo.lock` file which resides in the