Skip to content

Commit

Permalink
Auto merge of #8666 - clemens-tolboom:patch-1, r=Eh2406
Browse files Browse the repository at this point in the history
Docs: Make it more clear we have two types of workspaces

It needed a few rereads before I discovered the two flavours. Hope this helps.
  • Loading branch information
bors committed Sep 9, 2020
2 parents 875e012 + ae28555 commit 738f461
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/doc/src/reference/workspaces.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,26 @@
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
`Cargo.toml` that already defines a `[package]`, in which case the package is
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
Expand Down

0 comments on commit 738f461

Please sign in to comment.