File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 33A * workspace* is a collection of one or more packages that share common
44dependency resolution (with a shared ` Cargo.lock ` ), output directory, and
55various 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
811A workspace can be created by adding a [ ` [workspace] `
912section] ( #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
1114the * root package* of the workspace. The * workspace root* is the directory
1215where the workspace's ` Cargo.toml ` is located.
1316
17+ ### Virtual manifest
18+
1419Alternatively, a ` Cargo.toml ` file can be created with a ` [workspace] ` section
1520but without a [ ` [package] ` section] [ package ] . This is called a * virtual
1621manifest* . This is typically useful when there isn't a "primary" package, or
1722you want to keep all the packages organized in separate directories.
1823
24+ ### Key features
25+
1926The key points of workspaces are:
2027
2128* All packages share a common ` Cargo.lock ` file which resides in the
You can’t perform that action at this time.
0 commit comments