Skip to content

Commit ae28555

Browse files
Make it more clear we have two types of workspaces
It needed a few rereads before I discovered the two flavours. Hope this helps.
1 parent 6585cda commit ae28555

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/doc/src/reference/workspaces.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,26 @@
33
A *workspace* is a collection of one or more packages that share common
44
dependency resolution (with a shared `Cargo.lock`), output directory, and
55
various settings such as profiles. Packages that are part of a workspaces are
6-
called *workspace members*.
6+
called *workspace members*. There are two flavours of workspaces: as root
7+
package or as virtual manifest.
8+
9+
### Root package
710

811
A workspace can be created by adding a [`[workspace]`
912
section](#the-workspace-section) to `Cargo.toml`. This can be added to a
1013
`Cargo.toml` that already defines a `[package]`, in which case the package is
1114
the *root package* of the workspace. The *workspace root* is the directory
1215
where the workspace's `Cargo.toml` is located.
1316

17+
### Virtual manifest
18+
1419
Alternatively, a `Cargo.toml` file can be created with a `[workspace]` section
1520
but without a [`[package]` section][package]. This is called a *virtual
1621
manifest*. This is typically useful when there isn't a "primary" package, or
1722
you want to keep all the packages organized in separate directories.
1823

24+
### Key features
25+
1926
The key points of workspaces are:
2027

2128
* All packages share a common `Cargo.lock` file which resides in the

0 commit comments

Comments
 (0)