Skip to content
This repository has been archived by the owner on Apr 26, 2022. It is now read-only.

Add support for cargo vendor #49

Open
abrisco opened this issue Nov 1, 2021 · 0 comments
Open

Add support for cargo vendor #49

abrisco opened this issue Nov 1, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@abrisco
Copy link
Owner

abrisco commented Nov 1, 2021

cargo vendor is something some companies use to either ultra lock down their dependencies or satisfy requirements in their massive monorepos.

My current thought is that vendoring support would be done as a rule or macro which defines a runnable target that would both perform the vendoring and write the BUILD files to the appropriate directories.

load("@cargo_bazel//:defs.bzl", "cargo_bazel_vendor", "crate")

cargo_bazel_vendor(
    name = "cargo_bazel_vendor",
    manifest = ":Cargo.toml",
)

Users could then run bazel run //:cargo_bazel_vendor to vendor crates into their workspace and have BUILD files rendered into place. Maybe this rule could even support a packages attribute which allows you to inline the desired crates.

Again, just thoughts, not sure if or when this should be done.

@abrisco abrisco added the enhancement New feature or request label Nov 1, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant