tree: c55a2c9b988375a3951ed3f1671355e59b508dbe [path history] [tgz]
  1. .gitignore
  2. .travis.yml
  3. BUILD.gn
  4. Cargo.lock
  5. Cargo.toml
  6. LICENSE-APACHE
  7. LICENSE-MIT
  8. README.fuchsia
  9. README.md
  10. appveyor.yml
  11. src/
manual/cargo-vendor/README.md

cargo-vendor

Build Status Build status

This is a Cargo subcommand which vendors all crates.io dependencies into a local directory using Cargo's support for source replacement.

Installation

Currently this can be installed with:

$ cargo install cargo-vendor

Example Usage

Simply run cargo vendor inside of any Cargo project:

$ cargo vendor
add this to your .cargo/config for this project:

    [source.crates-io]
    registry = 'https://github.com/rust-lang/crates.io-index'
    replace-with = 'vendored-sources'

    [source.vendored-sources]
    directory = '/home/alex/code/cargo-vendor/vendor'

This will populate the vendor directory which contains the source of all crates.io dependencies. When configured, Cargo will then use this directory instead of looking at crates.io.

License

cargo-vendor is primarily distributed under the terms of both the MIT license and the Apache License (Version 2.0), with portions covered by various BSD-like licenses.

See LICENSE-APACHE, and LICENSE-MIT for details.