-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Open
Labels
A-documenting-cargo-itselfArea: Cargo's documentationArea: Cargo's documentationC-bugCategory: bugCategory: bugCommand-vendorE-mediumExperience: MediumExperience: MediumS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.
Description
Problem
Cargo vendor has limited docs : https://doc.rust-lang.org/nightly/cargo/commands/cargo-vendor.html . While this describes what cargo vendor does as a tool, it doesn't encompass the larger needs of an opensource project to use vendoring for offline builds in build farms etc.
As a result, while attempting to integrate rust into a project, we have found that certain cases are non-intuitive or may not work.
I would like to ask that cargo vendor be documented with how a project would integrate it into their work flows. Important considerations are:
- We need to ship and provide .cargo/config in our source tree so that developers have consistent relative paths to vendor, and unpacked tar-balls match git trees. We also can't assume paths in offline build tools for various companies
- how to use cargo build/rustc with offline builds and vendored dependencies.
- how to use cargo test with offline builds and vendored dependencies
- how to correctly use cargo vendor to acquire dependencies
- how to perform online builds even in the presence of a source tree .cargo/config for developers who are updating dependencies, or rather, to smooth "on boarding" so we don't need to ask developers to vendor/prepare their environments to do builds.
These are all important aspects that today we have struggled with with cargo vendor, so having these generic workflows documented would really help other projects to adopt cargo with vendoring.
jasonwilliams
Metadata
Metadata
Assignees
Labels
A-documenting-cargo-itselfArea: Cargo's documentationArea: Cargo's documentationC-bugCategory: bugCategory: bugCommand-vendorE-mediumExperience: MediumExperience: MediumS-needs-mentorStatus: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.Status: Issue or feature is accepted, but needs a team member to commit to helping and reviewing.