]>
Commit | Line | Data |
---|---|---|
0a29b90c FG |
1 | # cargo-vendor(1) |
2 | ||
3 | ## NAME | |
4 | ||
5 | cargo-vendor --- Vendor all dependencies locally | |
6 | ||
7 | ## SYNOPSIS | |
8 | ||
9 | `cargo vendor` [_options_] [_path_] | |
10 | ||
11 | ## DESCRIPTION | |
12 | ||
13 | This cargo subcommand will vendor all crates.io and git dependencies for a | |
14 | project into the specified directory at `<path>`. After this command completes | |
15 | the vendor directory specified by `<path>` will contain all remote sources from | |
16 | dependencies specified. Additional manifests beyond the default one can be | |
17 | specified with the `-s` option. | |
18 | ||
ed00b5ec FG |
19 | The configuration necessary to use the vendored sources would be printed to |
20 | stdout after `cargo vendor` completes the vendoring process. | |
21 | You will need to add or redirect it to your Cargo configuration file, | |
22 | which is usually `.cargo/config.toml` locally for the current package. | |
0a29b90c FG |
23 | |
24 | ## OPTIONS | |
25 | ||
26 | ### Vendor Options | |
27 | ||
28 | {{#options}} | |
29 | ||
30 | {{#option "`-s` _manifest_" "`--sync` _manifest_" }} | |
31 | Specify an extra `Cargo.toml` manifest to workspaces which should also be | |
32 | vendored and synced to the output. May be specified multiple times. | |
33 | {{/option}} | |
34 | ||
35 | {{#option "`--no-delete`" }} | |
36 | Don't delete the "vendor" directory when vendoring, but rather keep all | |
37 | existing contents of the vendor directory | |
38 | {{/option}} | |
39 | ||
40 | {{#option "`--respect-source-config`" }} | |
41 | Instead of ignoring `[source]` configuration by default in `.cargo/config.toml` | |
42 | read it and use it when downloading crates from crates.io, for example | |
43 | {{/option}} | |
44 | ||
45 | {{#option "`--versioned-dirs`" }} | |
46 | Normally versions are only added to disambiguate multiple versions of the | |
47 | same package. This option causes all directories in the "vendor" directory | |
48 | to be versioned, which makes it easier to track the history of vendored | |
49 | packages over time, and can help with the performance of re-vendoring when | |
50 | only a subset of the packages have changed. | |
51 | {{/option}} | |
52 | ||
53 | {{/options}} | |
54 | ||
55 | ### Manifest Options | |
56 | ||
57 | {{#options}} | |
58 | ||
59 | {{> options-manifest-path }} | |
60 | ||
61 | {{> options-locked }} | |
62 | ||
63 | {{/options}} | |
64 | ||
65 | ### Display Options | |
66 | ||
67 | {{#options}} | |
68 | ||
69 | {{> options-display }} | |
70 | ||
71 | {{/options}} | |
72 | ||
73 | {{> section-options-common }} | |
74 | ||
75 | {{> section-environment }} | |
76 | ||
77 | {{> section-exit-status }} | |
78 | ||
79 | ## EXAMPLES | |
80 | ||
81 | 1. Vendor all dependencies into a local "vendor" folder | |
82 | ||
83 | cargo vendor | |
84 | ||
85 | 2. Vendor all dependencies into a local "third-party/vendor" folder | |
86 | ||
87 | cargo vendor third-party/vendor | |
88 | ||
89 | 3. Vendor the current workspace as well as another to "vendor" | |
90 | ||
91 | cargo vendor -s ../path/to/Cargo.toml | |
92 | ||
ed00b5ec FG |
93 | 4. Vendor and redirect the necessary vendor configs to a config file. |
94 | ||
95 | cargo vendor > path/to/my/cargo/config.toml | |
96 | ||
0a29b90c FG |
97 | ## SEE ALSO |
98 | {{man "cargo" 1}} | |
99 |