Skip to content

Latest commit

 

History

History
68 lines (43 loc) · 1.45 KB

cargo-fetch.md

File metadata and controls

68 lines (43 loc) · 1.45 KB

cargo-fetch(1)

{{*set command="fetch"}} {{*set actionverb="Fetch"}} {{*set target-default-to-all-arch=true}} {{*set multitarget=true}}

NAME

cargo-fetch --- Fetch dependencies of a package from the network

SYNOPSIS

cargo fetch [options]

DESCRIPTION

If a Cargo.lock file is available, this command will ensure that all of the git dependencies and/or registry dependencies are downloaded and locally available. Subsequent Cargo commands will be able to run offline after a cargo fetch unless the lock file changes.

If the lock file is not available, then this command will generate the lock file before fetching the dependencies.

If --target is not specified, then all target dependencies are fetched.

See also the cargo-prefetch plugin which adds a command to download popular crates. This may be useful if you plan to use Cargo without a network with the --offline flag.

OPTIONS

Fetch options

{{#options}} {{> options-target-triple }} {{/options}}

Display Options

{{#options}} {{> options-display }} {{/options}}

Manifest Options

{{#options}} {{> options-manifest-path }}

{{> options-locked }}

{{> options-lockfile-path }} {{/options}}

{{> section-options-common }}

{{> section-environment }}

{{> section-exit-status }}

EXAMPLES

  1. Fetch all dependencies:

    cargo fetch
    

SEE ALSO

{{man "cargo" 1}}, {{man "cargo-update" 1}}, {{man "cargo-generate-lockfile" 1}}