Skip to content

Commit

Permalink
Auto merge of #4376 - behnam:virtual, r=alexcrichton
Browse files Browse the repository at this point in the history
[docs/manifest] Add Virtual Manifest section

Current documentation does not mention Virtual Manifests at all, which
can be confusing because they appear in error messages.

Here we add the definition, and provide a hint about `--all` option for
most cargo commands, which allow the command to work in the way most
probably expected.

Fixes <#3526>
  • Loading branch information
bors committed Aug 8, 2017
2 parents 287c028 + 3f5ca7b commit fe56d43
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/doc/manifest.md
Original file line number Diff line number Diff line change
Expand Up @@ -492,6 +492,18 @@ and also be a member crate of another workspace (contain `package.workspace`).
Most of the time workspaces will not need to be dealt with as `cargo new` and
`cargo init` will handle workspace configuration automatically.

## Virtual Manifest

In workspace manifests, if the `package` table is present, the workspace root
crate will be treated as a normal package, as well as a worksapce. If the
`package` table is not present in a worksapce manifest, it is called a *virtual
manifest*.

When working with *virtual manifests*, package-related cargo commands, like
`cargo build`, won't be available anymore. But, most of such commands support
the `--all` option, will execute the command for all the non-virtual manifest in
the workspace.

# The project layout

If your project is an executable, name the main source file `src/main.rs`. If it
Expand Down

0 comments on commit fe56d43

Please sign in to comment.