cargo2 plugin
cargo2 - 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}.
Usage:
# Specify the cargo2 source kind
kind: cargo2
# Url of the crates repository to download from (default: https://static.crates.io/crates)
url: https://static.crates.io/crates
# Url mappings to download git sources from. The values support aliases to which global
# mirrors are also applied. More specific mappings take precedence over more general ones.
git-mirrors:
https://gitlab.com: "github:"
https://gitlab.com/specific/repo: https://example.org/specific/repo
# Internal source reference, this is a list of dictionaries
# which store the crate names and versions.
#
# This will be automatically updated with `bst track`
ref:
- name: packagename
version: 1.2.1
- name: packagename
version: 1.3.0
# Specify a directory for the vendored crates (defaults to ./.vendored-crates)
vendor-dir: .vendored-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.