@@ -30,7 +30,8 @@ relative paths (which makes refactoring and moving sub-projects very difficult)
30
30
and don't work at all if the mono-repo requires publishing and consuming from an
31
31
intermediate directory (as this may very per host, or per target being built).
32
32
33
- This RFC proposes a mechanism to specify ` base ` directories in ` Config.toml ` or
33
+ This RFC proposes a mechanism to specify ` base ` directories in ` config.toml ` or
34
+
34
35
` Cargo.toml ` files which can be used to prepend ` path ` dependencies. This allows
35
36
mono-repos to specify dependencies relative to their root directory, which
36
37
allows the consuming project to be moved freely (no relative paths to update)
@@ -69,7 +70,8 @@ drive for performance reasons).
69
70
path (e.g., ` ../../../other_layer/foo ` and ` ../foo ` ) and may be error prone if
70
71
there is some other sub-project in directory with the same name.
71
72
72
- Instead, if we could specify these ` base ` directories in a ` Config.toml ` (which
73
+ Instead, if we could specify these ` base ` directories in a ` config.toml ` (which
74
+
73
75
may be generated by an external build system which in turn invokes Cargo):
74
76
75
77
``` toml
@@ -90,7 +92,8 @@ baz = { path = "this_layer/baz", base = "sources" }
90
92
Which resolves the issues we previously had:
91
93
92
94
* The current project can be moved without modifying the ` Cargo.toml ` at all.
93
- * ` bar_with_generated ` works for all targets (assuming the ` Config.toml ` is
95
+ * ` bar_with_generated ` works for all targets (assuming the ` config.toml ` is
96
+
94
97
generated).
95
98
* The ` intermediates ` directory can be placed anywhere.
96
99
* Moving ` foo ` or ` baz ` only requires searching for the canonical form relative
@@ -101,7 +104,8 @@ to the `base` directory.
101
104
The ability to use ` base ` directories for ` path ` dependencies is convenient for
102
105
developers who are using a large number of ` path ` dependencies within the same
103
106
root directory. Instead of repeating the same path fragment many times in their
104
- ` Cargo.toml ` , they can instead specify it once in a ` Config.toml ` as a ` base `
107
+ ` Cargo.toml ` , they can instead specify it once in a ` config.toml ` as a ` base `
108
+
105
109
directory, then use that ` base ` directory in each of their ` path ` dependencies.
106
110
107
111
Cargo can also provide built-in base paths, for example ` workspace ` to point to
0 commit comments