@@ -65,7 +65,7 @@ workspace = "../foo"
65
65
66
66
The root of a workspace, indicated by the presence of ` [workspace] ` , is
67
67
responsible for defining the entire workspace (listing all members).
68
- This example here means that two extra crates will members of the workspace
68
+ This example here means that two extra crates will be members of the workspace
69
69
(which also includes the root).
70
70
71
71
The ` package.workspace ` key is used to point at a workspace root. For
@@ -75,7 +75,7 @@ workspace root that this package is a member of.
75
75
These keys are mutually exclusive when applied in ` Cargo.toml ` . A crate may
76
76
* either* specify ` package.workspace ` or specify ` [workspace] ` . That is, a
77
77
crate cannot both be a root in a workspace (contain ` [workspace] ` ) and also be
78
- member of another workspace (contain ` package.workspace ` ).
78
+ a member of another workspace (contain ` package.workspace ` ).
79
79
80
80
### "Virtual" ` Cargo.toml `
81
81
@@ -105,17 +105,17 @@ While the restriction of one-root-per workspace may make sense, the restriction
105
105
of crates pointing back to the root may not. If, however, this restriction were
106
106
not in place then the set of crates in a workspace may differ depending on
107
107
which crate it was viewed from. For example if workspace root A includes B then
108
- it will think B is in A's workspace. If, however, B does ont point back to A,
108
+ it will think B is in A's workspace. If, however, B does not point back to A,
109
109
then B would not think that A was in its workspace. This would in turn cause the
110
- set of crates in each workspace to be different, futher causing ` Cargo.lock ` to
110
+ set of crates in each workspace to be different, further causing ` Cargo.lock ` to
111
111
get out of sync if it were allowed. By ensuring that all crates have edges to
112
112
each other in a workspace Cargo can prevent this situation and guarantee robust
113
113
builds no matter where they're executed in the workspace.
114
114
115
115
To alleviate misconfiguration Cargo will emit an error if the two properties
116
- above hold for any crate attempting to be part of a workspace. For example, if
117
- the ` package.workspace ` key is specified, but the crate is not a workspace root
118
- or doesn't point back to the original crate an error is emitted.
116
+ above do not hold for any crate attempting to be part of a workspace. For
117
+ example, if the ` package.workspace ` key is specified, but the crate is not a
118
+ workspace root or doesn't point back to the original crate an error is emitted.
119
119
120
120
### Implicit relations
121
121
@@ -308,6 +308,9 @@ subcommands with a `--all` flag to perform tasks such as:
308
308
* Build all binaries for a set of crates within a workspace
309
309
* Publish all crates in a workspace if necessary to crates.io
310
310
311
+ Furthermore, workspaces could start to deduplicate metadata among crates like
312
+ version numbers, URL information, authorship, etc.
313
+
311
314
This support isn't proposed to be added in this RFC specifically, but simply to
312
315
show that workspaces can be used to solve other existing issues in Cargo.
313
316
0 commit comments