File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 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).
446446
447447And that’s it! The next ` cargo build ` will automatically build ` hello_utils ` and
448448all 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+ ```
449458
450459## Travis-CI
451460
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:
149149 inside it. The specified path should be relative to the current ` Cargo.toml ` .
150150* If ` path ` and ` git ` are omitted, the dependency will come from crates.io, and
151151 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.
152155
153156Dependencies from crates.io can also use a shorthand where just the version
154157requirement is specified:
You can’t perform that action at this time.
0 commit comments