cargo plugin

cargo - Automatically stage crate dependencies

A convenience Source element for vendoring rust project dependencies.

Placing this source in the source list, after a source which stages a Cargo.lock file, will allow this source to read the Cargo.lock file and obtain the crates automatically into %{vendordir}.

Set the ref field to an empty list like so: ref: [], and then run bst source track path_to_bst_file.bst.

Usage:

# Specify the cargo source kind
kind: cargo

# Url of the crates repository to download from (default: https://static.crates.io/crates)
url: https://static.crates.io/crates

# Internal source reference, this is a list of dictionaries
# which store the crate names and versions.
#
# This will be automatically updated with `bst source track`
ref:
- name: packagename
  version: 1.2.1
- name: packagename
  version: 1.3.0

# Specify a directory for the vendored crates (defaults to ./crates)
vendor-dir: crates

# Optionally specify the name of the lock file to use (defaults to Cargo.lock)
cargo-lock: Cargo.lock

See built-in functionality doumentation for details on common configuration options for sources.