]> git.pld-linux.org Git - packages/rpm-build-tools.git/commitdiff
use cargo-vendor-filterer if available master
authorJan Palus <atler@pld-linux.org>
Wed, 4 Oct 2023 10:14:10 +0000 (12:14 +0200)
committerJan Palus <atler@pld-linux.org>
Wed, 4 Oct 2023 10:14:10 +0000 (12:14 +0200)
significantly reduces crates size by including only linux platform
support while excluding ie heavy windows platform support

rust-crates.sh

index 24cebe189386435f5f6a272492032fdcca5d3706..3e04bed172deddd259124f89d88ccb0774a59f87 100755 (executable)
@@ -110,7 +110,11 @@ if [ $(echo "$src_dir" | wc -l) -ne 1 ]; then
 fi
 
 cd "$src_dir${subdir:+/$subdir}"
-cargo vendor
+if command -v cargo-vendor-filterer > /dev/null 2> /dev/null; then
+  cargo vendor-filterer --platform='*-unknown-linux-*' --tier=2
+else
+  cargo vendor
+fi
 if [ $? -ne 0 ]; then
   echo "ERROR: cargo vendor failed" >&2
   exit 1
This page took 0.068732 seconds and 4 git commands to generate.