]> git.proxmox.com Git - rustc.git/blame - src/tools/cargo/src/doc/man/cargo-vendor.md
New upstream version 1.75.0+dfsg1
[rustc.git] / src / tools / cargo / src / doc / man / cargo-vendor.md
CommitLineData
0a29b90c
FG
1# cargo-vendor(1)
2
3## NAME
4
5cargo-vendor --- Vendor all dependencies locally
6
7## SYNOPSIS
8
9`cargo vendor` [_options_] [_path_]
10
11## DESCRIPTION
12
13This cargo subcommand will vendor all crates.io and git dependencies for a
14project into the specified directory at `<path>`. After this command completes
15the vendor directory specified by `<path>` will contain all remote sources from
16dependencies specified. Additional manifests beyond the default one can be
17specified with the `-s` option.
18
ed00b5ec
FG
19The configuration necessary to use the vendored sources would be printed to
20stdout after `cargo vendor` completes the vendoring process.
21You will need to add or redirect it to your Cargo configuration file,
22which 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_" }}
31Specify an extra `Cargo.toml` manifest to workspaces which should also be
32vendored and synced to the output. May be specified multiple times.
33{{/option}}
34
35{{#option "`--no-delete`" }}
36Don't delete the "vendor" directory when vendoring, but rather keep all
37existing contents of the vendor directory
38{{/option}}
39
40{{#option "`--respect-source-config`" }}
41Instead of ignoring `[source]` configuration by default in `.cargo/config.toml`
42read it and use it when downloading crates from crates.io, for example
43{{/option}}
44
45{{#option "`--versioned-dirs`" }}
46Normally versions are only added to disambiguate multiple versions of the
47same package. This option causes all directories in the "vendor" directory
48to be versioned, which makes it easier to track the history of vendored
49packages over time, and can help with the performance of re-vendoring when
50only 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
811. Vendor all dependencies into a local "vendor" folder
82
83 cargo vendor
84
852. Vendor all dependencies into a local "third-party/vendor" folder
86
87 cargo vendor third-party/vendor
88
893. Vendor the current workspace as well as another to "vendor"
90
91 cargo vendor -s ../path/to/Cargo.toml
92
ed00b5ec
FG
934. 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