Support cargo vendor
for a specific workspace package #12307
Open
Description
opened on Jun 23, 2023
Problem
When run in a workspace, cargo vendor
will always vendor all packages for that workspace. This is true even when run from a package subdir (even though the vendor dir will be put in that subdir, confusingly).
It can be useful to vendor the dependencies needed to build some subset of workspace packages.
Example: for projects with their own toolchain build, vendoring the dependencies needed to build the standard library is often desirable. Especially when the standard library is built with an alternative build system. Chromium does this, building the standard library sysroot using its GN build system. cargo vendor
will include many unnecessary dependencies right now.
Proposed Solution
Either:
cargo vendor
in a workspace package will vendor only that packages' dependencies.cargo vendor -p foo
will vendor onlyfoo
's dependencies. This would match other subcommands' behavior.
Notes
No response
Activity