With rust-lang/cargo#2857 being merged cargo vendor seems like a useful tool to implement a fetch task for build systems like Nix or Yocto.
However there seems to be a bootstraping issues. In order to fetch the dependencies of cargo vendor you already need cargo vendor.
One elegant solution would be to provide a source tarball that containes the vendored-sources directory of a release. This way cargo vendor could be built without needing the dependency fetch state and thus avoiding the bootstrap problem.
With rust-lang/cargo#2857 being merged
cargo vendorseems like a useful tool to implement a fetch task for build systems like Nix or Yocto.However there seems to be a bootstraping issues. In order to fetch the dependencies of
cargo vendoryou already needcargo vendor.One elegant solution would be to provide a source tarball that containes the
vendored-sourcesdirectory of a release. This waycargo vendorcould be built without needing the dependency fetch state and thus avoiding the bootstrap problem.