Cargo vendor, what if vendeor would not exist?

when building arch linux COSMIC packages, it followes what popos guys do for debian builds, first step cargo vendor and then cargo build --release --frozen --offline

for arch linux this has the effect if the build breaks, and builds everything again fresh. when not vendoring, it continues where it got broken. so i am wondering what is the advantage of vendoring, and what cannot be achieved if vendoring would not exist?

references:

Arch Linux pkgbuilds shouldn't use vendor. They should use fetch. See Rust package guidelines - ArchWiki

If the upstream build system is incompatible with that consider filing an issue with them asking for a way to fetch.

1 Like

I think the main use case for the cargo vendor command is to create standalone/selfcontained release artifacts (a source code tarball, for examaple), which is suitable to be built even on environment that may be physically isolated from the internet.

2 Likes

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.