File tree 2 files changed +12
-0
lines changed
2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -446,6 +446,15 @@ in the `hello_utils` folder (relative to the `Cargo.toml` it’s written in).
446
446
447
447
And that’s it! The next ` cargo build ` will automatically build ` hello_utils ` and
448
448
all of its own dependencies, and others can also start using the crate as well.
449
+ However, dependencies with only a path are not permitted on crates.io so if we
450
+ wanted to publish our ` hello_world ` crate we would need to publish a version of
451
+ ` hello_utils ` to crates.io (or specify a git repository location) and specify it
452
+ in the dependencies line:
453
+
454
+ ``` toml
455
+ [dependencies ]
456
+ hello_utils = { path = " hello_utils" , version = " 0.1.0" }
457
+ ```
449
458
450
459
## Travis-CI
451
460
Original file line number Diff line number Diff line change @@ -149,6 +149,9 @@ You can specify the source of a dependency in a few ways:
149
149
inside it. The specified path should be relative to the current ` Cargo.toml ` .
150
150
* If ` path ` and ` git ` are omitted, the dependency will come from crates.io, and
151
151
the ` version ` key will be used to indicate the version requirement.
152
+ * ` path ` will be ignored for all dependencies retrieved from crates.io, so ` git `
153
+ or ` version ` must be specified for all crate dependencies when uploading to
154
+ crates.io.
152
155
153
156
Dependencies from crates.io can also use a shorthand where just the version
154
157
requirement is specified:
You can’t perform that action at this time.
0 commit comments