From fbcf4c4f1151f850017e5623c5236c3d4361ba4f Mon Sep 17 00:00:00 2001
From: ptrcnull <git@ptrcnull.me>
Date: Thu, 9 Mar 2023 23:35:53 +0000
Subject: [PATCH] */*: utilise sparse crates.io fetches

this is a million times faster

new only in rust 1.68, and fails on older versions,
but we have only latest in aports and don't support anything else, so
it's okay.
---
 community/aardvark-dns/APKBUILD                  | 2 ++
 community/acme-redirect/APKBUILD                 | 2 ++
 community/alacritty/APKBUILD                     | 1 +
 community/amberol/APKBUILD                       | 1 +
 community/apk-polkit-rs/APKBUILD                 | 2 ++
 community/arti/APKBUILD                          | 2 ++
 community/asfa/APKBUILD                          | 1 +
 community/atuin/APKBUILD                         | 1 +
 community/b3sum/APKBUILD                         | 2 ++
 community/bandwhich/APKBUILD                     | 2 ++
 community/bat/APKBUILD                           | 1 +
 community/below/APKBUILD                         | 1 +
 community/bottom/APKBUILD                        | 2 ++
 community/broot/APKBUILD                         | 1 +
 community/bupstash/APKBUILD                      | 1 +
 community/cargo-audit/APKBUILD                   | 2 ++
 community/cargo-bloat/APKBUILD                   | 2 ++
 community/cargo-c/APKBUILD                       | 1 +
 community/cargo-edit/APKBUILD                    | 2 ++
 community/cargo-gra/APKBUILD                     | 2 ++
 community/cargo-license/APKBUILD                 | 2 ++
 community/cargo-make/APKBUILD                    | 2 ++
 community/cargo-nextest/APKBUILD                 | 2 ++
 community/cargo-outdated/APKBUILD                | 1 +
 community/cargo-watch/APKBUILD                   | 2 ++
 community/cbindgen/APKBUILD                      | 2 ++
 community/choose/APKBUILD                        | 2 ++
 community/clamav/APKBUILD                        | 2 ++
 community/connman-resolvconf/APKBUILD            | 2 ++
 community/corrosion/APKBUILD                     | 2 ++
 community/csview/APKBUILD                        | 2 ++
 community/czkawka/APKBUILD                       | 2 ++
 community/delta/APKBUILD                         | 1 +
 community/dfrs/APKBUILD                          | 2 ++
 community/diffsitter/APKBUILD                    | 2 ++
 community/difftastic/APKBUILD                    | 2 ++
 community/display-switch/APKBUILD                | 2 ++
 community/docuum/APKBUILD                        | 2 ++
 community/dog/APKBUILD                           | 2 ++
 community/dssim/APKBUILD                         | 2 ++
 community/dua/APKBUILD                           | 2 ++
 community/duckscript/APKBUILD                    | 2 ++
 community/dummyhttp/APKBUILD                     | 2 ++
 community/dust/APKBUILD                          | 1 +
 community/electrs/APKBUILD                       | 2 ++
 community/exa/APKBUILD                           | 2 ++
 community/fclones/APKBUILD                       | 2 ++
 community/fd/APKBUILD                            | 2 ++
 community/firefox-esr/APKBUILD                   | 1 +
 community/firefox/APKBUILD                       | 1 +
 community/fisher/APKBUILD                        | 2 ++
 community/fractal/APKBUILD                       | 2 ++
 community/garage/APKBUILD                        | 1 +
 community/gfold/APKBUILD                         | 2 ++
 community/gifski/APKBUILD                        | 2 ++
 community/git-branchless/APKBUILD                | 1 +
 community/git-interactive-rebase-tool/APKBUILD   | 1 +
 community/git-metafile/APKBUILD                  | 2 ++
 community/git-warp-time/APKBUILD                 | 2 ++
 community/gitui/APKBUILD                         | 2 ++
 community/gnome-authenticator/APKBUILD           | 2 ++
 community/gnome-podcasts/APKBUILD                | 2 ++
 community/gnome-shortwave/APKBUILD               | 2 ++
 community/gnome-tour/APKBUILD                    | 2 ++
 community/greetd-tuigreet/APKBUILD               | 1 +
 community/greetd/APKBUILD                        | 1 +
 community/handlr/APKBUILD                        | 1 +
 community/helix/APKBUILD                         | 2 ++
 community/hexyl/APKBUILD                         | 2 ++
 community/himalaya/APKBUILD                      | 2 ++
 community/hkdm/APKBUILD                          | 2 ++
 community/httm/APKBUILD                          | 2 ++
 community/hyperfine/APKBUILD                     | 1 +
 community/ikona/APKBUILD                         | 2 ++
 community/image-roll/APKBUILD                    | 2 ++
 community/ion-shell/APKBUILD                     | 2 ++
 community/jless/APKBUILD                         | 2 ++
 community/jql/APKBUILD                           | 2 ++
 community/just/APKBUILD                          | 1 +
 community/karlender/APKBUILD                     | 2 ++
 community/keepassxc-proxy-static/APKBUILD        | 1 +
 community/kibi/APKBUILD                          | 2 ++
 community/kmon/APKBUILD                          | 2 ++
 community/kooha/APKBUILD                         | 1 +
 community/krapslog/APKBUILD                      | 2 ++
 community/lfs/APKBUILD                           | 2 ++
 community/libimagequant/APKBUILD                 | 2 ++
 community/libopenraw/APKBUILD                    | 2 ++
 community/librsvg/APKBUILD                       | 1 +
 community/lightdm-mobile-greeter/APKBUILD        | 2 ++
 community/mandown/APKBUILD                       | 2 ++
 community/maturin/APKBUILD                       | 2 ++
 community/mcfly/APKBUILD                         | 1 +
 community/mdbook/APKBUILD                        | 1 +
 community/meilisearch/APKBUILD                   | 2 ++
 community/mercurial/APKBUILD                     | 2 ++
 community/miniserve/APKBUILD                     | 2 ++
 community/monolith/APKBUILD                      | 2 ++
 community/mozjs102/APKBUILD                      | 2 ++
 community/mprocs/APKBUILD                        | 1 +
 community/mqttui/APKBUILD                        | 2 ++
 community/ncspot/APKBUILD                        | 2 ++
 community/netavark/APKBUILD                      | 2 ++
 community/newsboat/APKBUILD                      | 2 ++
 community/newsflash/APKBUILD                     | 2 ++
 community/obfuscate/APKBUILD                     | 2 ++
 community/onefetch/APKBUILD                      | 1 +
 community/oxipng/APKBUILD                        | 2 ++
 community/peep/APKBUILD                          | 1 +
 community/piow/APKBUILD                          | 1 +
 community/pipr/APKBUILD                          | 1 +
 community/pngquant/APKBUILD                      | 2 ++
 community/procs/APKBUILD                         | 1 +
 community/prometheus-wireguard-exporter/APKBUILD | 2 ++
 community/pueue/APKBUILD                         | 2 ++
 community/purism-ectool/APKBUILD                 | 2 ++
 community/py3-adblock/APKBUILD                   | 1 +
 community/py3-orjson/APKBUILD                    | 2 ++
 community/py3-setuptools-rust/APKBUILD           | 1 +
 community/py3-watchfiles/APKBUILD                | 2 ++
 community/rbspy/APKBUILD                         | 2 ++
 community/rebuilderd/APKBUILD                    | 2 ++
 community/ripgrep/APKBUILD                       | 1 +
 community/rust-analyzer/APKBUILD                 | 2 ++
 community/rustup/APKBUILD                        | 1 +
 community/sad/APKBUILD                           | 2 ++
 community/sccache/APKBUILD                       | 2 ++
 community/sheldon/APKBUILD                       | 1 +
 community/skim/APKBUILD                          | 2 ++
 community/sn0int/APKBUILD                        | 2 ++
 community/sniffglue/APKBUILD                     | 2 ++
 community/songrec/APKBUILD                       | 2 ++
 community/spot/APKBUILD                          | 2 ++
 community/squeekboard/APKBUILD                   | 2 ++
 community/stargazer-gmi/APKBUILD                 | 2 ++
 community/starship/APKBUILD                      | 2 ++
 community/stylua/APKBUILD                        | 2 ++
 community/suricata/APKBUILD                      | 2 ++
 community/swayr/APKBUILD                         | 1 +
 community/swayrbar/APKBUILD                      | 1 +
 community/taplo/APKBUILD                         | 2 ++
 community/tau/APKBUILD                           | 2 ++
 community/tectonic/APKBUILD                      | 2 ++
 community/thin-provisioning-tools/APKBUILD       | 2 ++
 community/thunderbird/APKBUILD                   | 2 ++
 community/tokei/APKBUILD                         | 2 ++
 community/tree-sitter/APKBUILD                   | 2 ++
 community/tuc/APKBUILD                           | 2 ++
 community/viu/APKBUILD                           | 2 ++
 community/warp/APKBUILD                          | 2 ++
 community/wasm-pack/APKBUILD                     | 1 +
 community/wayshot/APKBUILD                       | 2 ++
 community/websocat/APKBUILD                      | 2 ++
 community/wezterm/APKBUILD                       | 1 +
 community/wldash/APKBUILD                        | 2 ++
 community/wluma/APKBUILD                         | 2 ++
 community/xh/APKBUILD                            | 2 ++
 community/xsv/APKBUILD                           | 1 +
 community/yj/APKBUILD                            | 2 ++
 community/yofi/APKBUILD                          | 2 ++
 community/zellij/APKBUILD                        | 2 ++
 community/zenith/APKBUILD                        | 2 ++
 community/zerotier-one/APKBUILD                  | 2 ++
 community/zola/APKBUILD                          | 1 +
 community/zoxide/APKBUILD                        | 2 ++
 testing/acmed/APKBUILD                           | 2 ++
 testing/android-apkeep/APKBUILD                  | 2 ++
 testing/apmpkg/APKBUILD                          | 2 ++
 testing/asciinema-rs/APKBUILD                    | 2 ++
 testing/asuran-cli/APKBUILD                      | 1 +
 testing/authenticator-rs/APKBUILD                | 2 ++
 testing/bartib/APKBUILD                          | 2 ++
 testing/beancount-language-server/APKBUILD       | 2 ++
 testing/boa-cli/APKBUILD                         | 2 ++
 testing/bore/APKBUILD                            | 2 ++
 testing/cargo-deny/APKBUILD                      | 2 ++
 testing/castor/APKBUILD                          | 2 ++
 testing/chim/APKBUILD                            | 2 ++
 testing/cicada/APKBUILD                          | 2 ++
 testing/cinny/APKBUILD                           | 1 +
 testing/conduit/APKBUILD                         | 2 ++
 testing/desed/APKBUILD                           | 2 ++
 testing/diskonaut/APKBUILD                       | 2 ++
 testing/diskus/APKBUILD                          | 2 ++
 testing/dotenv-linter/APKBUILD                   | 2 ++
 testing/dum/APKBUILD                             | 2 ++
 testing/electron-tasje/APKBUILD                  | 2 ++
 testing/element-desktop/APKBUILD                 | 1 +
 testing/elfx86exts/APKBUILD                      | 2 ++
 testing/eva/APKBUILD                             | 2 ++
 testing/ffsend/APKBUILD                          | 2 ++
 testing/filite/APKBUILD                          | 2 ++
 testing/firecracker/APKBUILD                     | 2 ++
 testing/firefox-developer-edition/APKBUILD       | 1 +
 testing/flare/APKBUILD                           | 2 ++
 testing/geckodriver/APKBUILD                     | 2 ++
 testing/geopard/APKBUILD                         | 2 ++
 testing/gitoxide/APKBUILD                        | 2 ++
 testing/gleam/APKBUILD                           | 2 ++
 testing/gnome-metronome/APKBUILD                 | 2 ++
 testing/gobang/APKBUILD                          | 2 ++
 testing/gpg-tui/APKBUILD                         | 2 ++
 testing/gping/APKBUILD                           | 2 ++
 testing/grcov/APKBUILD                           | 2 ++
 testing/greetd-wlgreet/APKBUILD                  | 1 +
 testing/grpc-health-check/APKBUILD               | 2 ++
 testing/gst-plugins-rs/APKBUILD                  | 1 +
 testing/habitctl/APKBUILD                        | 2 ++
 testing/helvum/APKBUILD                          | 2 ++
 testing/hex/APKBUILD                             | 2 ++
 testing/horust/APKBUILD                          | 2 ++
 testing/htmlq/APKBUILD                           | 2 ++
 testing/hwatch/APKBUILD                          | 2 ++
 testing/hyperlink/APKBUILD                       | 2 ++
 testing/i3status-rust/APKBUILD                   | 2 ++
 testing/imageflow/APKBUILD                       | 2 ++
 testing/innernet/APKBUILD                        | 2 ++
 testing/jaq/APKBUILD                             | 2 ++
 testing/java-libsignal-client/APKBUILD           | 2 ++
 testing/jp/APKBUILD                              | 2 ++
 testing/jrsonnet-cli/APKBUILD                    | 2 ++
 testing/kak-lsp/APKBUILD                         | 2 ++
 testing/kbs2/APKBUILD                            | 2 ++
 testing/lapce/APKBUILD                           | 2 ++
 testing/laze/APKBUILD                            | 2 ++
 testing/librespot/APKBUILD                       | 2 ++
 testing/lighthouse/APKBUILD                      | 1 +
 testing/lsd/APKBUILD                             | 2 ++
 testing/lumins/APKBUILD                          | 2 ++
 testing/macchina/APKBUILD                        | 2 ++
 testing/mdcat/APKBUILD                           | 2 ++
 testing/navi/APKBUILD                            | 1 +
 testing/nitrocli/APKBUILD                        | 2 ++
 testing/nixpacks/APKBUILD                        | 2 ++
 testing/nsh/APKBUILD                             | 2 ++
 testing/nushell/APKBUILD                         | 2 ++
 testing/ouch/APKBUILD                            | 2 ++
 testing/pastel/APKBUILD                          | 2 ++
 testing/pidif/APKBUILD                           | 3 ++-
 testing/pijul/APKBUILD                           | 1 +
 testing/piping-server/APKBUILD                   | 2 ++
 testing/please/APKBUILD                          | 2 ++
 testing/pulumi-watch/APKBUILD                    | 2 ++
 testing/pw-volume/APKBUILD                       | 1 +
 testing/py-spy/APKBUILD                          | 2 ++
 testing/py3-mitmproxy-wireguard/APKBUILD         | 2 ++
 testing/py3-tokenizers/APKBUILD                  | 2 ++
 testing/rage/APKBUILD                            | 2 ++
 testing/rathole/APKBUILD                         | 2 ++
 testing/rav1e/APKBUILD                           | 1 +
 testing/rbw/APKBUILD                             | 2 ++
 testing/rdedup/APKBUILD                          | 2 ++
 testing/read-it-later/APKBUILD                   | 2 ++
 testing/rezolus/APKBUILD                         | 2 ++
 testing/riemann-cli/APKBUILD                     | 2 ++
 testing/ripasso-cursive/APKBUILD                 | 2 ++
 testing/rome/APKBUILD                            | 2 ++
 testing/rosenpass/APKBUILD                       | 2 ++
 testing/rpg-cli/APKBUILD                         | 2 ++
 testing/rss-email/APKBUILD                       | 2 ++
 testing/ruff/APKBUILD                            | 1 +
 testing/rust-bindgen/APKBUILD                    | 2 ++
 testing/rust-script/APKBUILD                     | 2 ++
 testing/rustdesk-server/APKBUILD                 | 2 ++
 testing/rustic/APKBUILD                          | 2 ++
 testing/rustscan/APKBUILD                        | 2 ++
 testing/scryer-prolog/APKBUILD                   | 2 +-
 testing/sd/APKBUILD                              | 1 +
 testing/sequoia-chameleon-gnupg/APKBUILD         | 2 ++
 testing/sequoia-sqv/APKBUILD                     | 2 ++
 testing/shotman/APKBUILD                         | 2 ++
 testing/signal-desktop/APKBUILD                  | 1 +
 testing/so/APKBUILD                              | 2 ++
 testing/solanum/APKBUILD                         | 2 ++
 testing/spotify-player/APKBUILD                  | 2 ++
 testing/spotify-tui/APKBUILD                     | 2 ++
 testing/spotifyd/APKBUILD                        | 2 ++
 testing/svgbob/APKBUILD                          | 2 ++
 testing/swayhide/APKBUILD                        | 2 ++
 testing/swc/APKBUILD                             | 2 ++
 testing/swhkd/APKBUILD                           | 2 ++
 testing/swww/APKBUILD                            | 2 ++
 testing/synapse-bt/APKBUILD                      | 2 ++
 testing/systeroid/APKBUILD                       | 2 ++
 testing/tauri-cli/APKBUILD                       | 2 ++
 testing/tealdeer/APKBUILD                        | 2 ++
 testing/teapot-tools/APKBUILD                    | 2 ++
 testing/texlab/APKBUILD                          | 1 +
 testing/topgrade/APKBUILD                        | 2 ++
 testing/twiggy/APKBUILD                          | 2 ++
 testing/udpt/APKBUILD                            | 2 ++
 testing/uutils-coreutils/APKBUILD                | 2 ++
 testing/vaultwarden/APKBUILD                     | 2 ++
 testing/verco/APKBUILD                           | 2 ++
 testing/video-trimmer/APKBUILD                   | 2 ++
 testing/vivid/APKBUILD                           | 1 +
 testing/vocage/APKBUILD                          | 2 ++
 testing/wasmtime/APKBUILD                        | 2 ++
 testing/watchexec/APKBUILD                       | 2 ++
 testing/waylevel/APKBUILD                        | 1 +
 testing/weggli/APKBUILD                          | 2 ++
 testing/wk-adblock/APKBUILD                      | 1 +
 testing/wpaperd/APKBUILD                         | 2 ++
 testing/xplr/APKBUILD                            | 2 ++
 testing/youki/APKBUILD                           | 2 ++
 testing/zkgroup/APKBUILD                         | 2 ++
 306 files changed, 549 insertions(+), 2 deletions(-)

diff --git a/community/aardvark-dns/APKBUILD b/community/aardvark-dns/APKBUILD
index 353b12ea0d14..0aeebee336d6 100644
--- a/community/aardvark-dns/APKBUILD
+++ b/community/aardvark-dns/APKBUILD
@@ -12,6 +12,8 @@ makedepends="cargo"
 source="https://github.com/containers/aardvark-dns/archive/v$pkgver/aardvark-dns-$pkgver.tar.gz"
 options="net !check" # no test suite
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	make
 }
diff --git a/community/acme-redirect/APKBUILD b/community/acme-redirect/APKBUILD
index 8a1adb4cb0ca..e26c7df56bd6 100644
--- a/community/acme-redirect/APKBUILD
+++ b/community/acme-redirect/APKBUILD
@@ -23,6 +23,8 @@ install="$pkgname.pre-install"
 options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/kpcyrd/acme-redirect/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 
diff --git a/community/alacritty/APKBUILD b/community/alacritty/APKBUILD
index 78f4655ba64c..6306729393f8 100644
--- a/community/alacritty/APKBUILD
+++ b/community/alacritty/APKBUILD
@@ -29,6 +29,7 @@ options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/alacritty/alacritty/archive/refs/tags/v$pkgver.tar.gz
 	"
 export CARGO_HOME="$srcdir"/cargo
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 build() {
 	cargo build --release --verbose
diff --git a/community/amberol/APKBUILD b/community/amberol/APKBUILD
index 4755c622f316..8b3f88c03f08 100644
--- a/community/amberol/APKBUILD
+++ b/community/amberol/APKBUILD
@@ -38,6 +38,7 @@ options="net" # needed for downloading dependencies
 export CARGO_FEATURE_USE_SYSTEM_LIBS=1 # gmp-mpfr-sys links to gmp-dev and mpfr-dev
 export CARGO_NET_OFFLINE="true"
 export CARGO_HOME="$srcdir/cargo"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/apk-polkit-rs/APKBUILD b/community/apk-polkit-rs/APKBUILD
index b587c6f62d1d..660a420564c8 100644
--- a/community/apk-polkit-rs/APKBUILD
+++ b/community/apk-polkit-rs/APKBUILD
@@ -23,6 +23,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/arti/APKBUILD b/community/arti/APKBUILD
index b7098a1e22bf..c4d4ff00991b 100644
--- a/community/arti/APKBUILD
+++ b/community/arti/APKBUILD
@@ -13,6 +13,8 @@ subpackages="$pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://gitlab.torproject.org/tpo/core/arti/-/archive/arti-v$pkgver/arti-arti-v$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-$pkgname-v$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/asfa/APKBUILD b/community/asfa/APKBUILD
index d23bbd6d8259..3ffc1f8bb4d7 100644
--- a/community/asfa/APKBUILD
+++ b/community/asfa/APKBUILD
@@ -20,6 +20,7 @@ options="!check"  # tests use docker
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1  # use system libssh2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/atuin/APKBUILD b/community/atuin/APKBUILD
index ca28e04ec902..c90565ab547e 100644
--- a/community/atuin/APKBUILD
+++ b/community/atuin/APKBUILD
@@ -47,6 +47,7 @@ source="https://github.com/ellie/atuin/archive/v$pkgver/atuin-$pkgver.tar.gz
 options="!check"  # FIXME: some tests are broken
 
 export SODIUM_USE_PKG_CONFIG=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	local sqlx_ver
diff --git a/community/b3sum/APKBUILD b/community/b3sum/APKBUILD
index 72270dda9b62..5bde39c49a84 100644
--- a/community/b3sum/APKBUILD
+++ b/community/b3sum/APKBUILD
@@ -20,6 +20,8 @@ aarch64|armv7)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/bandwhich/APKBUILD b/community/bandwhich/APKBUILD
index e83ec557e681..4b03601ca64f 100644
--- a/community/bandwhich/APKBUILD
+++ b/community/bandwhich/APKBUILD
@@ -13,6 +13,8 @@ source="https://github.com/imsnif/bandwhich/archive/$pkgver/$pkgname-$pkgver.tar
 	update-socket2.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/bat/APKBUILD b/community/bat/APKBUILD
index 6d73c90226df..0514f3b6024a 100644
--- a/community/bat/APKBUILD
+++ b/community/bat/APKBUILD
@@ -31,6 +31,7 @@ source="https://github.com/sharkdp/bat/archive/v$pkgver/bat-$pkgver.tar.gz"
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
 
 export RUSTONIG_DYNAMIC_LIBONIG=1  # use system libonig
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/below/APKBUILD b/community/below/APKBUILD
index b5ec04ee1a4d..206e6f5571b1 100644
--- a/community/below/APKBUILD
+++ b/community/below/APKBUILD
@@ -40,6 +40,7 @@ _cargo_opts="--frozen --features no-vendor"
 
 # below may not work correctly with panic=abort.
 export CARGO_PROFILE_RELEASE_PANIC="unwind"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/bottom/APKBUILD b/community/bottom/APKBUILD
index c7cacbfd7f57..a36b578a65b2 100644
--- a/community/bottom/APKBUILD
+++ b/community/bottom/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 	"
 source="https://github.com/ClementTsang/bottom/archive/$pkgver/bottom-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/broot/APKBUILD b/community/broot/APKBUILD
index cffa9668bb7f..510aaa15d77c 100644
--- a/community/broot/APKBUILD
+++ b/community/broot/APKBUILD
@@ -26,6 +26,7 @@ source="https://github.com/Canop/broot/archive/v$pkgver/broot-$pkgver.tar.gz
 	"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/bupstash/APKBUILD b/community/bupstash/APKBUILD
index 4079493018c4..30e792033aa1 100644
--- a/community/bupstash/APKBUILD
+++ b/community/bupstash/APKBUILD
@@ -11,6 +11,7 @@ makedepends="rust cargo libsodium-dev"
 options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/andrewchambers/bupstash/archive/v$pkgver.tar.gz"
 export CARGO_HOME="$srcdir"/cargo
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 build() {
 	cargo build --release --verbose
diff --git a/community/cargo-audit/APKBUILD b/community/cargo-audit/APKBUILD
index bc197a5d750f..03f673ad55c3 100644
--- a/community/cargo-audit/APKBUILD
+++ b/community/cargo-audit/APKBUILD
@@ -15,6 +15,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/RustSec/cargo-audit/archive/
 builddir="$srcdir/rustsec-$pkgname-v$pkgver/$pkgname"
 options="!check" # requires running binaries prebuilt against glibc as part of the tests and fails
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-bloat/APKBUILD b/community/cargo-bloat/APKBUILD
index 5985412aaaff..224df1a37842 100644
--- a/community/cargo-bloat/APKBUILD
+++ b/community/cargo-bloat/APKBUILD
@@ -13,6 +13,8 @@ source="https://github.com/RazrFalcon/cargo-bloat/archive/v$pkgver/$pkgname-$pkg
 	"
 _cargo_opts="--frozen --features regex-filter"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-c/APKBUILD b/community/cargo-c/APKBUILD
index 0a22306c62ef..d0e24463b86b 100644
--- a/community/cargo-c/APKBUILD
+++ b/community/cargo-c/APKBUILD
@@ -29,6 +29,7 @@ esac
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1
 export DEP_NGHTTP2_ROOT=/usr
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/cargo-edit/APKBUILD b/community/cargo-edit/APKBUILD
index b5b0015c0b70..14c152bfb931 100644
--- a/community/cargo-edit/APKBUILD
+++ b/community/cargo-edit/APKBUILD
@@ -23,6 +23,8 @@ export LIBSSH2_SYS_USE_PKG_CONFIG=1  # use system libssh2
 # Exclude vendored-libgit2 feature.
 _cargo_opts="--frozen --no-default-features --features add,rm,upgrade,set-version"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-gra/APKBUILD b/community/cargo-gra/APKBUILD
index a92e66fa4c94..d8767594cb3f 100644
--- a/community/cargo-gra/APKBUILD
+++ b/community/cargo-gra/APKBUILD
@@ -14,6 +14,8 @@ options="!check" # Tests fail
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-license/APKBUILD b/community/cargo-license/APKBUILD
index 6b5de1a81607..ee693b3f2f8f 100644
--- a/community/cargo-license/APKBUILD
+++ b/community/cargo-license/APKBUILD
@@ -9,6 +9,8 @@ license="MIT"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://crates.io/api/v1/crates/cargo-license/$pkgver/download"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-make/APKBUILD b/community/cargo-make/APKBUILD
index c6e2db8e540d..d35990972fb1 100644
--- a/community/cargo-make/APKBUILD
+++ b/community/cargo-make/APKBUILD
@@ -16,6 +16,8 @@ options="!check"  # FIXME: some tests are broken
 
 _cargo_opts="--frozen --no-default-features --features tls-native"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-nextest/APKBUILD b/community/cargo-nextest/APKBUILD
index bf0ba156663e..58f6813f3543 100644
--- a/community/cargo-nextest/APKBUILD
+++ b/community/cargo-nextest/APKBUILD
@@ -23,6 +23,8 @@ esac
 
 _cargo_opts="--frozen --no-default-features --features default-no-update"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cargo-outdated/APKBUILD b/community/cargo-outdated/APKBUILD
index 21b0af6b071c..bb11dd5b1077 100644
--- a/community/cargo-outdated/APKBUILD
+++ b/community/cargo-outdated/APKBUILD
@@ -21,6 +21,7 @@ options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/kbknapp/cargo-outdated/archive/v$pkgver.tar.gz"
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/cargo-watch/APKBUILD b/community/cargo-watch/APKBUILD
index bcfb85891ef1..974efd3f9888 100644
--- a/community/cargo-watch/APKBUILD
+++ b/community/cargo-watch/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/watchexec/cargo-watch/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/cbindgen/APKBUILD b/community/cbindgen/APKBUILD
index 9d817183bfb2..693c4edbe509 100644
--- a/community/cbindgen/APKBUILD
+++ b/community/cbindgen/APKBUILD
@@ -20,6 +20,8 @@ if [ "$CARCH" = "riscv64" ]; then
 	options="$options textrels"
 fi
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/choose/APKBUILD b/community/choose/APKBUILD
index 1af017e9ee27..7c3a2e4c7c11 100644
--- a/community/choose/APKBUILD
+++ b/community/choose/APKBUILD
@@ -10,6 +10,8 @@ license="GPL-3.0-or-later"
 makedepends="cargo"
 source="https://github.com/theryangeary/choose/archive/v$pkgver/choose-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/clamav/APKBUILD b/community/clamav/APKBUILD
index 16c38c445b7a..5294c7511000 100644
--- a/community/clamav/APKBUILD
+++ b/community/clamav/APKBUILD
@@ -120,6 +120,8 @@ esac
 #     - CVE-2018-14681
 #     - CVE-2018-14682
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cmake -B build -G Ninja \
 		-DCMAKE_BUILD_TYPE=None \
diff --git a/community/connman-resolvconf/APKBUILD b/community/connman-resolvconf/APKBUILD
index 6f0198bedfde..c6b60498e17d 100644
--- a/community/connman-resolvconf/APKBUILD
+++ b/community/connman-resolvconf/APKBUILD
@@ -17,6 +17,8 @@ subpackages="$pkgname-openrc"
 source="https://github.com/jirutka/connman-resolvconf/archive/v$pkgver/connman-resolvconf-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/corrosion/APKBUILD b/community/corrosion/APKBUILD
index f00df08001af..44c470b16c10 100644
--- a/community/corrosion/APKBUILD
+++ b/community/corrosion/APKBUILD
@@ -17,6 +17,8 @@ makedepends="samurai"
 source="https://github.com/AndrewGaspar/corrosion/archive/v$pkgver/corrosion-$pkgver.tar.gz"
 options="net" # Required to download Rust dependencies
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cmake -B build -G Ninja \
 		-DCMAKE_BUILD_TYPE=MinSizeRel \
diff --git a/community/csview/APKBUILD b/community/csview/APKBUILD
index fd244716897d..ca21fefbff71 100644
--- a/community/csview/APKBUILD
+++ b/community/csview/APKBUILD
@@ -15,6 +15,8 @@ subpackages="
 	"
 source="https://github.com/wfxr/csview/archive/v$pkgver/csview-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/czkawka/APKBUILD b/community/czkawka/APKBUILD
index 2d3a1f30172c..b123165771f1 100644
--- a/community/czkawka/APKBUILD
+++ b/community/czkawka/APKBUILD
@@ -18,6 +18,8 @@ source="https://github.com/qarmin/czkawka/archive/$pkgver/$pkgname-$pkgver.tar.g
 	minimize-size.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/delta/APKBUILD b/community/delta/APKBUILD
index d0e1d8c12efb..becec64c878f 100644
--- a/community/delta/APKBUILD
+++ b/community/delta/APKBUILD
@@ -19,6 +19,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/dandavison/delta/archive/ref
 #     - CVE-2022-24713
 
 export RUSTONIG_SYSTEM_LIBONIG="true"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/dfrs/APKBUILD b/community/dfrs/APKBUILD
index 95f490e089b9..06bba81cc821 100644
--- a/community/dfrs/APKBUILD
+++ b/community/dfrs/APKBUILD
@@ -21,6 +21,8 @@ subpackages="$pkgname-doc
 options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/anthraxx/dfrs/archive/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	make
 }
diff --git a/community/diffsitter/APKBUILD b/community/diffsitter/APKBUILD
index 90ffa105ad86..5e91108c7f26 100644
--- a/community/diffsitter/APKBUILD
+++ b/community/diffsitter/APKBUILD
@@ -24,6 +24,8 @@ source="https://github.com/afnanenayet/diffsitter/archive/v$pkgver/$pkgname-$pkg
 _cargo_opts="--frozen --no-default-features --features dynamic-grammar-libs"
 _binname=$pkgname
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/difftastic/APKBUILD b/community/difftastic/APKBUILD
index 5346591d7b61..eb67aadd65e8 100644
--- a/community/difftastic/APKBUILD
+++ b/community/difftastic/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo openssl-dev"
 source="https://github.com/Wilfred/difftastic/archive/$pkgver/difftastic-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/display-switch/APKBUILD b/community/display-switch/APKBUILD
index f4aa63339505..3fa3e3f721b8 100644
--- a/community/display-switch/APKBUILD
+++ b/community/display-switch/APKBUILD
@@ -14,6 +14,8 @@ source="
 	50-i2c.rules
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/community/docuum/APKBUILD b/community/docuum/APKBUILD
index bae38f7b3f84..686f5e329bbc 100644
--- a/community/docuum/APKBUILD
+++ b/community/docuum/APKBUILD
@@ -18,6 +18,8 @@ source="https://github.com/stepchowfun/docuum/archive/v$pkgver/docuum-$pkgver.ta
 	$pkgname.logrotate
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/dog/APKBUILD b/community/dog/APKBUILD
index 903b560f84dd..53e72bfc59b1 100644
--- a/community/dog/APKBUILD
+++ b/community/dog/APKBUILD
@@ -13,6 +13,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/ogham/dog/archive/v$pkgver.t
 	openssl3.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/dssim/APKBUILD b/community/dssim/APKBUILD
index f85a6e08eaac..b228f687e8fe 100644
--- a/community/dssim/APKBUILD
+++ b/community/dssim/APKBUILD
@@ -11,6 +11,8 @@ license="AGPL-3.0-only"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/kornelski/dssim/archive/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release
 }
diff --git a/community/dua/APKBUILD b/community/dua/APKBUILD
index 19515eaa5073..37e73f22fad6 100644
--- a/community/dua/APKBUILD
+++ b/community/dua/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="https://github.com/Byron/dua-cli/archive/v$pkgver/dua-$pkgver.tar.gz"
 builddir="$srcdir/dua-cli-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/duckscript/APKBUILD b/community/duckscript/APKBUILD
index c71c114cc8c7..256daffa1425 100644
--- a/community/duckscript/APKBUILD
+++ b/community/duckscript/APKBUILD
@@ -18,6 +18,8 @@ esac
 
 _cargo_opts="--frozen --no-default-features --features tls-native"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/dummyhttp/APKBUILD b/community/dummyhttp/APKBUILD
index e105e8fe0afb..9ea51b4e71b0 100644
--- a/community/dummyhttp/APKBUILD
+++ b/community/dummyhttp/APKBUILD
@@ -17,6 +17,8 @@ subpackages="
 	"
 source="https://github.com/svenstaro/dummyhttp/archive/v$pkgver/dummyhttp-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/dust/APKBUILD b/community/dust/APKBUILD
index 83ba1948d5f2..6da0d37c6bd2 100644
--- a/community/dust/APKBUILD
+++ b/community/dust/APKBUILD
@@ -18,6 +18,7 @@ case "$CARCH" in
 esac
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/electrs/APKBUILD b/community/electrs/APKBUILD
index 2efbd11f4d7a..1b0c3f9ed444 100644
--- a/community/electrs/APKBUILD
+++ b/community/electrs/APKBUILD
@@ -14,6 +14,8 @@ source="https://github.com/romanz/electrs/archive/v$pkgver/electrs-$pkgver.tar.g
 	12-db.rs.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	ROCKSDB_INCLUDE_DIR=/usr/include ROCKSDB_LIB_DIR=/usr/lib cargo build --all --features "metrics_process" --release --locked
 }
diff --git a/community/exa/APKBUILD b/community/exa/APKBUILD
index 7c96bebe1de9..0d28abfdd1f2 100644
--- a/community/exa/APKBUILD
+++ b/community/exa/APKBUILD
@@ -18,6 +18,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/ogham/exa/archive/v$pkgver.t
 	minimize-size.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/fclones/APKBUILD b/community/fclones/APKBUILD
index 442c674cf5ac..03ec87d39e64 100644
--- a/community/fclones/APKBUILD
+++ b/community/fclones/APKBUILD
@@ -14,6 +14,8 @@ source="https://github.com/pkolaczk/fclones/archive/v$pkgver/fclones-$pkgver.tar
 	"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/fd/APKBUILD b/community/fd/APKBUILD
index 604952faae46..b86a8218e308 100644
--- a/community/fd/APKBUILD
+++ b/community/fd/APKBUILD
@@ -25,6 +25,8 @@ case "$CARCH" in
 	riscv64) options="$options textrels" ;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/firefox-esr/APKBUILD b/community/firefox-esr/APKBUILD
index 4aa180032bae..cc75af9819c1 100644
--- a/community/firefox-esr/APKBUILD
+++ b/community/firefox-esr/APKBUILD
@@ -453,6 +453,7 @@ unset CARGO_PROFILE_RELEASE_LTO
 
 export CFLAGS="$CFLAGS -O2"
 export CXXFLAGS="$CXXFLAGS -O2"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/firefox/APKBUILD b/community/firefox/APKBUILD
index 448dac250574..d540dbc2d20d 100644
--- a/community/firefox/APKBUILD
+++ b/community/firefox/APKBUILD
@@ -606,6 +606,7 @@ build() {
 
 	export CFLAGS="$CFLAGS -O2"
 	export CXXFLAGS="$CXXFLAGS -O2"
+	export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 	case "$CARCH" in
 	aarch64|x86_64)
diff --git a/community/fisher/APKBUILD b/community/fisher/APKBUILD
index 35c6eaad4f5d..374ab45c5eb2 100644
--- a/community/fisher/APKBUILD
+++ b/community/fisher/APKBUILD
@@ -19,6 +19,8 @@ source="https://github.com/pietroalbini/$pkgname/archive/v$pkgver/$pkgname-$pkgv
 	"
 options="!check"  # problems with test dependencies
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/fractal/APKBUILD b/community/fractal/APKBUILD
index 90e999f0d530..4e1e14cec78c 100644
--- a/community/fractal/APKBUILD
+++ b/community/fractal/APKBUILD
@@ -41,6 +41,8 @@ case "$CARCH" in
 		;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/garage/APKBUILD b/community/garage/APKBUILD
index 4eb7dae55d63..bdddfe2b938e 100644
--- a/community/garage/APKBUILD
+++ b/community/garage/APKBUILD
@@ -35,6 +35,7 @@ export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
 
 export SODIUM_USE_PKG_CONFIG=1
 export GIT_VERSION="v$pkgver"  # version used in --version
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/gfold/APKBUILD b/community/gfold/APKBUILD
index 1de7f67a0a6c..e8169bef63a8 100644
--- a/community/gfold/APKBUILD
+++ b/community/gfold/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo"
 source="https://github.com/nickgerace/gfold/archive/$pkgver/gfold-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/gifski/APKBUILD b/community/gifski/APKBUILD
index 333dae2751fe..408ae5be030b 100644
--- a/community/gifski/APKBUILD
+++ b/community/gifski/APKBUILD
@@ -21,6 +21,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/git-branchless/APKBUILD b/community/git-branchless/APKBUILD
index 3f11d1121fca..bc27c236dd57 100644
--- a/community/git-branchless/APKBUILD
+++ b/community/git-branchless/APKBUILD
@@ -20,6 +20,7 @@ source="https://github.com/arxanas/git-branchless/archive/v$pkgver/git-branchles
 	"
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1  # use system libssh2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/git-interactive-rebase-tool/APKBUILD b/community/git-interactive-rebase-tool/APKBUILD
index 4cd24ecd1f61..4c37c0e0ae7e 100644
--- a/community/git-interactive-rebase-tool/APKBUILD
+++ b/community/git-interactive-rebase-tool/APKBUILD
@@ -12,6 +12,7 @@ subpackages="$pkgname-doc"
 source="https://github.com/MitMaro/git-interactive-rebase-tool/archive/$pkgver/$pkgname-$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/git-metafile/APKBUILD b/community/git-metafile/APKBUILD
index 9605f3a3a9ca..b9937e63f5a9 100644
--- a/community/git-metafile/APKBUILD
+++ b/community/git-metafile/APKBUILD
@@ -18,6 +18,8 @@ source="https://github.com/jirutka/$pkgname/archive/v$pkgver/$pkgname-$pkgver.ta
 	gitignore
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/git-warp-time/APKBUILD b/community/git-warp-time/APKBUILD
index 95f0f1a4ae05..3538296c4528 100644
--- a/community/git-warp-time/APKBUILD
+++ b/community/git-warp-time/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 subpackages="$pkgname-bash-completion $pkgname-fish-completion $pkgname-zsh-completion"
 source="https://github.com/alerque/git-warp-time/archive/v$pkgver/git-warp-time-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/gitui/APKBUILD b/community/gitui/APKBUILD
index 37ac61fed070..5b2cb390fe60 100644
--- a/community/gitui/APKBUILD
+++ b/community/gitui/APKBUILD
@@ -21,6 +21,8 @@ export RUSTONIG_DYNAMIC_LIBONIG=1  # use system libonig
 
 _cargo_opts="--frozen --no-default-features --features regex-onig"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/gnome-authenticator/APKBUILD b/community/gnome-authenticator/APKBUILD
index 810067e4735b..865969da3a19 100644
--- a/community/gnome-authenticator/APKBUILD
+++ b/community/gnome-authenticator/APKBUILD
@@ -28,6 +28,8 @@ subpackages="$pkgname-dbg $pkgname-lang"
 source="https://gitlab.gnome.org/World/Authenticator/-/archive/$pkgver/Authenticator-$pkgver.tar.gz"
 builddir="$srcdir/Authenticator-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/gnome-podcasts/APKBUILD b/community/gnome-podcasts/APKBUILD
index 2701f0923466..80f582e99f8c 100644
--- a/community/gnome-podcasts/APKBUILD
+++ b/community/gnome-podcasts/APKBUILD
@@ -33,6 +33,8 @@ source="https://gitlab.gnome.org/World/podcasts/uploads/de438a4d62196bddd134bb15
 	meson-0.60.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/gnome-shortwave/APKBUILD b/community/gnome-shortwave/APKBUILD
index b1c549d2e18e..52b7e621397e 100644
--- a/community/gnome-shortwave/APKBUILD
+++ b/community/gnome-shortwave/APKBUILD
@@ -42,6 +42,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/gnome-tour/APKBUILD b/community/gnome-tour/APKBUILD
index 12147a5c149c..8cc6e96da06f 100644
--- a/community/gnome-tour/APKBUILD
+++ b/community/gnome-tour/APKBUILD
@@ -14,6 +14,8 @@ source="https://download.gnome.org/sources/gnome-tour/${pkgver%.*}/gnome-tour-$p
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/greetd-tuigreet/APKBUILD b/community/greetd-tuigreet/APKBUILD
index d11a312b49bb..d22d5af49a72 100644
--- a/community/greetd-tuigreet/APKBUILD
+++ b/community/greetd-tuigreet/APKBUILD
@@ -19,6 +19,7 @@ builddir="$srcdir/$_projname-$pkgver"
 options="!check"  # no tests provided
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/greetd/APKBUILD b/community/greetd/APKBUILD
index e14fa2da6028..586fc657314b 100644
--- a/community/greetd/APKBUILD
+++ b/community/greetd/APKBUILD
@@ -30,6 +30,7 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~kennylevinsen/greetd/archive
 	"
 
 export RUSTFLAGS="$RUSTFLAGS --remap-path-prefix=$builddir=/build/"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/handlr/APKBUILD b/community/handlr/APKBUILD
index e92262442c36..093a527c6577 100644
--- a/community/handlr/APKBUILD
+++ b/community/handlr/APKBUILD
@@ -15,6 +15,7 @@ source="https://github.com/chmln/handlr/archive/v$pkgver/handlr-$pkgver.tar.gz
 	"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/helix/APKBUILD b/community/helix/APKBUILD
index 94b5a30793fd..d0b475c95e3e 100644
--- a/community/helix/APKBUILD
+++ b/community/helix/APKBUILD
@@ -25,6 +25,8 @@ source="https://github.com/helix-editor/helix/archive/$pkgver/helix-$pkgver.tar.
 # Don't build tree-sitter languages, we provide them in standalone aports.
 export HELIX_DISABLE_AUTO_GRAMMAR_BUILD=1
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/hexyl/APKBUILD b/community/hexyl/APKBUILD
index 63d92386fa8f..9415715415f9 100644
--- a/community/hexyl/APKBUILD
+++ b/community/hexyl/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo"
 source="https://github.com/sharkdp/hexyl/archive/v$pkgver/hexyl-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/himalaya/APKBUILD b/community/himalaya/APKBUILD
index fbde036ab8b0..ddbe8a5d9092 100644
--- a/community/himalaya/APKBUILD
+++ b/community/himalaya/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 	"
 source="https://github.com/soywod/himalaya/archive/v$pkgver/himalaya-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/hkdm/APKBUILD b/community/hkdm/APKBUILD
index 81562856a537..a8bc97c97ac9 100644
--- a/community/hkdm/APKBUILD
+++ b/community/hkdm/APKBUILD
@@ -15,6 +15,8 @@ _cargo_opts="--frozen --no-default-features"
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/httm/APKBUILD b/community/httm/APKBUILD
index 93b5b98fd48e..5d6d103df3b7 100644
--- a/community/httm/APKBUILD
+++ b/community/httm/APKBUILD
@@ -14,6 +14,8 @@ subpackages="$pkgname-doc"
 source="https://github.com/kimono-koans/httm/archive/refs/tags/$pkgver/httm-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/hyperfine/APKBUILD b/community/hyperfine/APKBUILD
index 1d0986698874..9f9a94842b29 100644
--- a/community/hyperfine/APKBUILD
+++ b/community/hyperfine/APKBUILD
@@ -17,6 +17,7 @@ subpackages="
 source="https://github.com/sharkdp/hyperfine/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/ikona/APKBUILD b/community/ikona/APKBUILD
index d080897c5f6d..4587046cd0ac 100644
--- a/community/ikona/APKBUILD
+++ b/community/ikona/APKBUILD
@@ -31,6 +31,8 @@ subpackages="
 	"
 options="!check" # No tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cmake -B build -G Ninja \
 		-DCMAKE_BUILD_TYPE=RelWithDebInfo \
diff --git a/community/image-roll/APKBUILD b/community/image-roll/APKBUILD
index a0ea57835d65..43a6cf8459a0 100644
--- a/community/image-roll/APKBUILD
+++ b/community/image-roll/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo gtk4.0-dev"
 source="https://github.com/weclaw1/image-roll/archive/$pkgver/image-roll-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/ion-shell/APKBUILD b/community/ion-shell/APKBUILD
index 11bc90660f40..6747e0dee784 100644
--- a/community/ion-shell/APKBUILD
+++ b/community/ion-shell/APKBUILD
@@ -13,6 +13,8 @@ install="$pkgname.post-install $pkgname.post-upgrade $pkgname.pre-deinstall"
 source="$pkgname-$_commit.tar.gz::https://gitlab.redox-os.org/redox-os/ion/-/archive/$_commit.tar.gz"
 builddir="$srcdir/ion-$_commit"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/jless/APKBUILD b/community/jless/APKBUILD
index 9e4ec63b2a98..6012a713ce00 100644
--- a/community/jless/APKBUILD
+++ b/community/jless/APKBUILD
@@ -13,6 +13,8 @@ license="MIT"
 makedepends="rust cargo python3 libxcb-dev"
 source="$pkgname-$pkgver.tar.gz::https://github.com/PaulJuliusMartinez/jless/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/jql/APKBUILD b/community/jql/APKBUILD
index 88ff616ab469..66574712f923 100644
--- a/community/jql/APKBUILD
+++ b/community/jql/APKBUILD
@@ -11,6 +11,8 @@ license="MIT"
 makedepends="cargo"
 source="https://github.com/yamafaktory/jql/archive/v$pkgver/jql-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/just/APKBUILD b/community/just/APKBUILD
index 9f70eac7c117..b5e8fc50b77f 100644
--- a/community/just/APKBUILD
+++ b/community/just/APKBUILD
@@ -20,6 +20,7 @@ subpackages="
 source="https://github.com/casey/just/archive/$pkgver/just-$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/karlender/APKBUILD b/community/karlender/APKBUILD
index 8923f48f08fc..b00c1febb07b 100644
--- a/community/karlender/APKBUILD
+++ b/community/karlender/APKBUILD
@@ -20,6 +20,8 @@ source="https://gitlab.com/floers/karlender/-/archive/v$pkgver/karlender-v$pkgve
 options="!check"
 builddir="$srcdir/$pkgname-v$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/keepassxc-proxy-static/APKBUILD b/community/keepassxc-proxy-static/APKBUILD
index eb58f7816a3e..d4f8ba29144a 100644
--- a/community/keepassxc-proxy-static/APKBUILD
+++ b/community/keepassxc-proxy-static/APKBUILD
@@ -18,6 +18,7 @@ builddir="$srcdir/$_projname-$pkgver"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
 export RUSTFLAGS="$RUSTFLAGS -C target-feature=+crt-static"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/kibi/APKBUILD b/community/kibi/APKBUILD
index 1d0c68dd91f1..3982d126a30e 100644
--- a/community/kibi/APKBUILD
+++ b/community/kibi/APKBUILD
@@ -10,6 +10,8 @@ license="(Apache-2.0 OR MIT) AND BSD-2-Clause"
 makedepends="cargo"
 source="https://github.com/ilai-deutel/kibi/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/kmon/APKBUILD b/community/kmon/APKBUILD
index df0a9cae5451..e0c2e18a426c 100644
--- a/community/kmon/APKBUILD
+++ b/community/kmon/APKBUILD
@@ -14,6 +14,8 @@ subpackages="$pkgname-doc
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/orhun/kmon/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/kooha/APKBUILD b/community/kooha/APKBUILD
index 08794f33cbf5..258fe8eddbab 100644
--- a/community/kooha/APKBUILD
+++ b/community/kooha/APKBUILD
@@ -41,6 +41,7 @@ source="https://github.com/SeaDve/Kooha/releases/download/v$pkgver/kooha-$pkgver
 
 # TODO: Find out why I didn't originally use panic=abort and if it's still relevant.
 export CARGO_PROFILE_RELEASE_PANIC="unwind"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/krapslog/APKBUILD b/community/krapslog/APKBUILD
index eebe585de743..5d2d94bef044 100644
--- a/community/krapslog/APKBUILD
+++ b/community/krapslog/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="$pkgname-rs-$pkgver.tar.gz::https://github.com/acj/krapslog-rs/archive/$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-rs-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/community/lfs/APKBUILD b/community/lfs/APKBUILD
index f31c58246a3a..90fb6dcb5a97 100644
--- a/community/lfs/APKBUILD
+++ b/community/lfs/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo"
 source="https://github.com/Canop/lfs/archive/v$pkgver/lfs-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/community/libimagequant/APKBUILD b/community/libimagequant/APKBUILD
index ad4c6bdee996..b4d970e91020 100644
--- a/community/libimagequant/APKBUILD
+++ b/community/libimagequant/APKBUILD
@@ -25,6 +25,8 @@ x86)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/libopenraw/APKBUILD b/community/libopenraw/APKBUILD
index ad8ded2a4607..123b6898fc58 100644
--- a/community/libopenraw/APKBUILD
+++ b/community/libopenraw/APKBUILD
@@ -19,6 +19,8 @@ subpackages="$pkgname-dev"
 source="https://libopenraw.freedesktop.org/download/libopenraw-$pkgver.tar.bz2"
 options="net" # cargo fetch
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	update_config_sub
diff --git a/community/librsvg/APKBUILD b/community/librsvg/APKBUILD
index ac8c2f34aa0f..427321613f6f 100644
--- a/community/librsvg/APKBUILD
+++ b/community/librsvg/APKBUILD
@@ -51,6 +51,7 @@ fi
 #     - CVE-2019-20446
 
 export RUSTFLAGS="$RUSTFLAGS -C debuginfo=1"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/lightdm-mobile-greeter/APKBUILD b/community/lightdm-mobile-greeter/APKBUILD
index 0244044c7f23..0ed682d2e387 100644
--- a/community/lightdm-mobile-greeter/APKBUILD
+++ b/community/lightdm-mobile-greeter/APKBUILD
@@ -13,6 +13,8 @@ source="$pkgname-$pkgver-2.tar.gz::https://git.raatty.club/raatty/lightdm-mobile
 builddir="$srcdir/$pkgname"
 options="!check" # No tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/mandown/APKBUILD b/community/mandown/APKBUILD
index 91a2fec326a4..718b36981266 100644
--- a/community/mandown/APKBUILD
+++ b/community/mandown/APKBUILD
@@ -14,6 +14,8 @@ source="https://gitlab.com/kornelski/mandown/-/archive/$pkgver/mandown-$pkgver.t
 	"
 options="!check" # no test suite
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/maturin/APKBUILD b/community/maturin/APKBUILD
index 7fd14f5f002c..d190929871be 100644
--- a/community/maturin/APKBUILD
+++ b/community/maturin/APKBUILD
@@ -44,6 +44,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/mcfly/APKBUILD b/community/mcfly/APKBUILD
index 9d45aed440b6..3c84cf996d0d 100644
--- a/community/mcfly/APKBUILD
+++ b/community/mcfly/APKBUILD
@@ -21,6 +21,7 @@ source="https://github.com/cantino/mcfly/archive/v$pkgver/mcfly-$pkgver.tar.gz
 
 # Reduce size of the mcfly binary.
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/mdbook/APKBUILD b/community/mdbook/APKBUILD
index 770b9508c161..a29380b97765 100644
--- a/community/mdbook/APKBUILD
+++ b/community/mdbook/APKBUILD
@@ -15,6 +15,7 @@ subpackages="
 source="$pkgname-$pkgver.tar.gz::https://github.com/rust-lang/mdBook/archive/v$pkgver.tar.gz"
 builddir="$srcdir/mdBook-$pkgver"
 export CARGO_HOME="$srcdir"/cargo
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/meilisearch/APKBUILD b/community/meilisearch/APKBUILD
index ccb19d311244..636d355f8afc 100644
--- a/community/meilisearch/APKBUILD
+++ b/community/meilisearch/APKBUILD
@@ -34,6 +34,8 @@ export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
 # and specialized tokenizers (they are huge).
 _cargo_opts="--frozen --no-default-features"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/mercurial/APKBUILD b/community/mercurial/APKBUILD
index 40d97c5bfd05..b8dff9919496 100644
--- a/community/mercurial/APKBUILD
+++ b/community/mercurial/APKBUILD
@@ -41,6 +41,8 @@ esac
 #   4.9-r0:
 #     - CVE-2019-3902
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	python3 setup.py build
 }
diff --git a/community/miniserve/APKBUILD b/community/miniserve/APKBUILD
index 11f5d4cd8a16..fc0dd738c328 100644
--- a/community/miniserve/APKBUILD
+++ b/community/miniserve/APKBUILD
@@ -25,6 +25,8 @@ x86*)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/monolith/APKBUILD b/community/monolith/APKBUILD
index b7b61d362f0b..537f6ba7257b 100644
--- a/community/monolith/APKBUILD
+++ b/community/monolith/APKBUILD
@@ -14,6 +14,8 @@ makedepends="
 	"
 source="https://github.com/Y2Z/monolith/archive/v$pkgver/monolith-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/mozjs102/APKBUILD b/community/mozjs102/APKBUILD
index 607b67fd6517..1580de0aaa18 100644
--- a/community/mozjs102/APKBUILD
+++ b/community/mozjs102/APKBUILD
@@ -47,6 +47,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	mkdir "$srcdir/mozbuild"
diff --git a/community/mprocs/APKBUILD b/community/mprocs/APKBUILD
index a5a34a5e58fa..387fda8801bb 100644
--- a/community/mprocs/APKBUILD
+++ b/community/mprocs/APKBUILD
@@ -11,6 +11,7 @@ makedepends="cargo"
 source="https://github.com/pvolok/mprocs/archive/v$pkgver/mprocs-$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/mqttui/APKBUILD b/community/mqttui/APKBUILD
index d40c9441b448..be3cebd9e7ad 100644
--- a/community/mqttui/APKBUILD
+++ b/community/mqttui/APKBUILD
@@ -17,6 +17,8 @@ subpackages="
 	"
 source="https://github.com/EdJoPaTo/mqttui/archive/v$pkgver/mqttui-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/ncspot/APKBUILD b/community/ncspot/APKBUILD
index e5e0e1094f87..0ac0a408339a 100644
--- a/community/ncspot/APKBUILD
+++ b/community/ncspot/APKBUILD
@@ -25,6 +25,8 @@ options="!check"  # there's only one unit test (in v0.8.1)
 
 _cargo_opts='--frozen --features cover,share_selection'
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/netavark/APKBUILD b/community/netavark/APKBUILD
index d8db361abff3..13a4d8c4c28d 100644
--- a/community/netavark/APKBUILD
+++ b/community/netavark/APKBUILD
@@ -15,6 +15,8 @@ subpackages="$pkgname-doc"
 source="https://github.com/containers/netavark/archive/v$pkgver/netavark-$pkgver.tar.gz"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	make
 
diff --git a/community/newsboat/APKBUILD b/community/newsboat/APKBUILD
index 41d3b2654a47..4d349db281cf 100644
--- a/community/newsboat/APKBUILD
+++ b/community/newsboat/APKBUILD
@@ -21,6 +21,8 @@ source="
 #   2.30.1-r0:
 #     - CVE-2020-26235
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	./config.sh
 	echo "LDFLAGS+= -lintl" >> config.mk
diff --git a/community/newsflash/APKBUILD b/community/newsflash/APKBUILD
index e36c03e742cb..a05925112aa7 100644
--- a/community/newsflash/APKBUILD
+++ b/community/newsflash/APKBUILD
@@ -21,6 +21,8 @@ source="https://gitlab.com/news-flash/news_flash_gtk/-/archive/v.$pkgver/news_fl
 options="net !check" # no tests
 builddir="$srcdir/news_flash_gtk-v.$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile -j 1 -C output
diff --git a/community/obfuscate/APKBUILD b/community/obfuscate/APKBUILD
index cd4b0e763d7b..5ffc23790e0a 100644
--- a/community/obfuscate/APKBUILD
+++ b/community/obfuscate/APKBUILD
@@ -16,6 +16,8 @@ source="https://gitlab.gnome.org/World/obfuscate/uploads/$_pkgurl/obfuscate-$pkg
 provides="gnome-obfuscate=$pkgver-r$pkgrel"
 replaces="gnome-obfuscate"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/onefetch/APKBUILD b/community/onefetch/APKBUILD
index b8bb0cc7fd0b..036df1cd9680 100644
--- a/community/onefetch/APKBUILD
+++ b/community/onefetch/APKBUILD
@@ -19,6 +19,7 @@ source="$pkgname-$pkgver.tar.gz::https://crates.io/api/v1/crates/onefetch/$pkgve
 
 # Reduce binary size
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/oxipng/APKBUILD b/community/oxipng/APKBUILD
index 2f37fb95caeb..e81c84eeb22e 100644
--- a/community/oxipng/APKBUILD
+++ b/community/oxipng/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="https://github.com/shssoichiro/oxipng/archive/v$pkgver/oxipng-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/peep/APKBUILD b/community/peep/APKBUILD
index 2c128d62b416..601ad98c06e3 100644
--- a/community/peep/APKBUILD
+++ b/community/peep/APKBUILD
@@ -17,6 +17,7 @@ source="https://github.com/ryochack/peep/archive/$_gitrev/peep-$_gitrev.tar.gz
 builddir="$srcdir/$pkgname-$_gitrev"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/piow/APKBUILD b/community/piow/APKBUILD
index 941587e0da9e..aa7a1be32800 100644
--- a/community/piow/APKBUILD
+++ b/community/piow/APKBUILD
@@ -15,6 +15,7 @@ source="https://github.com/KuabeM/piow/archive/v$pkgver/piow-$pkgver.tar.gz
 options="!check"  # no tests provided
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/pipr/APKBUILD b/community/pipr/APKBUILD
index 2671f6ec93d3..b2a7c1e33fd0 100644
--- a/community/pipr/APKBUILD
+++ b/community/pipr/APKBUILD
@@ -17,6 +17,7 @@ source="https://github.com/elkowar/pipr/archive/v$pkgver/pipr-$pkgver.tar.gz
 	"
 
 export RUSTONIG_DYNAMIC_LIBONIG=1  # use system libonig
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/pngquant/APKBUILD b/community/pngquant/APKBUILD
index 4474bf48c9a5..dc878d1dc01f 100644
--- a/community/pngquant/APKBUILD
+++ b/community/pngquant/APKBUILD
@@ -20,6 +20,8 @@ source="https://github.com/kornelski/pngquant/archive/$pkgver/pngquant-$pkgver.t
 	"
 options="!check" # seems to not have any runnable anymore
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	rmdir lib
diff --git a/community/procs/APKBUILD b/community/procs/APKBUILD
index 4044f57dd155..d9ed2c037418 100644
--- a/community/procs/APKBUILD
+++ b/community/procs/APKBUILD
@@ -16,6 +16,7 @@ subpackages="
 source="procs-$pkgver.tar.gz::https://github.com/dalance/procs/archive/v$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/prometheus-wireguard-exporter/APKBUILD b/community/prometheus-wireguard-exporter/APKBUILD
index 02208e8289be..322246518b5c 100644
--- a/community/prometheus-wireguard-exporter/APKBUILD
+++ b/community/prometheus-wireguard-exporter/APKBUILD
@@ -18,6 +18,8 @@ source="https://github.com/MindFlavor/prometheus_wireguard_exporter/archive/$pkg
 options="net"
 builddir="$srcdir"/prometheus_wireguard_exporter-"$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/pueue/APKBUILD b/community/pueue/APKBUILD
index 12c169e86ca6..0d482b0714f3 100644
--- a/community/pueue/APKBUILD
+++ b/community/pueue/APKBUILD
@@ -18,6 +18,8 @@ subpackages="
 source="https://github.com/Nukesor/pueue/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/purism-ectool/APKBUILD b/community/purism-ectool/APKBUILD
index de80943bef08..cdcd03e45bb0 100644
--- a/community/purism-ectool/APKBUILD
+++ b/community/purism-ectool/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo eudev-dev linux-headers"
 source="https://source.puri.sm/firmware/librem-ec/-/archive/$pkgver/librem-ec-$pkgver.tar.gz"
 builddir="$srcdir/librem-ec-$pkgver/tool"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/py3-adblock/APKBUILD b/community/py3-adblock/APKBUILD
index b4132ed60b20..717bd04d4495 100644
--- a/community/py3-adblock/APKBUILD
+++ b/community/py3-adblock/APKBUILD
@@ -26,6 +26,7 @@ builddir="$srcdir/$_pkgname-$pkgver"
 
 export CARGO_PROFILE_RELEASE_DEBUG=0
 export CARGO_HOME="$srcdir/cargo"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 build() {
 	maturin build --release --strip --manylinux off \
diff --git a/community/py3-orjson/APKBUILD b/community/py3-orjson/APKBUILD
index e696f7c94485..658a3d9f3a21 100644
--- a/community/py3-orjson/APKBUILD
+++ b/community/py3-orjson/APKBUILD
@@ -24,6 +24,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/ijl/orjson/archive/refs/tags
 builddir="$srcdir/orjson-$pkgver"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	gpep517 build-wheel \
 		--wheel-dir dist \
diff --git a/community/py3-setuptools-rust/APKBUILD b/community/py3-setuptools-rust/APKBUILD
index 0074770e7989..95f78b82db78 100644
--- a/community/py3-setuptools-rust/APKBUILD
+++ b/community/py3-setuptools-rust/APKBUILD
@@ -16,6 +16,7 @@ builddir="$srcdir/setuptools-rust-$pkgver"
 options="net" # check needs network access, no easy patch
 
 export SETUPTOOLS_SCM_PRETEND_VERSION=$pkgver
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 build() {
 	python3 setup.py build
diff --git a/community/py3-watchfiles/APKBUILD b/community/py3-watchfiles/APKBUILD
index 65203ed111e7..4c8f770266ff 100644
--- a/community/py3-watchfiles/APKBUILD
+++ b/community/py3-watchfiles/APKBUILD
@@ -13,6 +13,8 @@ checkdepends="py3-pytest py3-pytest-asyncio py3-pytest-mock py3-pytest-toolbox p
 source="$pkgname-v$pkgver.tar.gz::https://github.com/samuelcolvin/watchfiles/archive/refs/tags/v$pkgver.tar.gz"
 builddir="$srcdir/watchfiles-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/rbspy/APKBUILD b/community/rbspy/APKBUILD
index 931a1ac05d0a..a6d6f8c9d26e 100644
--- a/community/rbspy/APKBUILD
+++ b/community/rbspy/APKBUILD
@@ -12,6 +12,8 @@ checkdepends="ruby"
 options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/rbspy/rbspy/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/community/rebuilderd/APKBUILD b/community/rebuilderd/APKBUILD
index 55f98c717232..82b3c5142568 100644
--- a/community/rebuilderd/APKBUILD
+++ b/community/rebuilderd/APKBUILD
@@ -36,6 +36,8 @@ source="
 	rebuilderd-sync.cron
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/ripgrep/APKBUILD b/community/ripgrep/APKBUILD
index 6e58000a7dd1..4fcecca9dfaf 100644
--- a/community/ripgrep/APKBUILD
+++ b/community/ripgrep/APKBUILD
@@ -18,6 +18,7 @@ source="https://github.com/BurntSushi/ripgrep/archive/$pkgver/ripgrep-$pkgver.ta
 
 export PCRE2_SYS_STATIC=0  # use system libpcre2
 export JEMALLOC_SYS_WITH_LG_PAGE=16 # 2**16 = 64k
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 build() {
 	cargo build --release --locked --features 'pcre2'
diff --git a/community/rust-analyzer/APKBUILD b/community/rust-analyzer/APKBUILD
index e48de58f0e6c..0991c37bdc9a 100644
--- a/community/rust-analyzer/APKBUILD
+++ b/community/rust-analyzer/APKBUILD
@@ -22,6 +22,8 @@ options="net !check"
 # crashes otherwise
 unset CARGO_PROFILE_RELEASE_PANIC
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/rustup/APKBUILD b/community/rustup/APKBUILD
index 3a4200a51a8e..f1c35c5deff2 100644
--- a/community/rustup/APKBUILD
+++ b/community/rustup/APKBUILD
@@ -29,6 +29,7 @@ source="
 
 # It doesn't like our custom triplet
 export RUSTUP_OVERRIDE_BUILD_TRIPLE="$CARCH-unknown-linux-musl"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/sad/APKBUILD b/community/sad/APKBUILD
index 8711d96f268e..c24f44956409 100644
--- a/community/sad/APKBUILD
+++ b/community/sad/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="https://github.com/ms-jpq/sad/archive/v$pkgver/sad-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/sccache/APKBUILD b/community/sccache/APKBUILD
index b30398cc488b..634324f1b62b 100644
--- a/community/sccache/APKBUILD
+++ b/community/sccache/APKBUILD
@@ -27,6 +27,8 @@ x86_64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/sheldon/APKBUILD b/community/sheldon/APKBUILD
index 4a309799059c..ec93b73f0d7b 100644
--- a/community/sheldon/APKBUILD
+++ b/community/sheldon/APKBUILD
@@ -23,6 +23,7 @@ source="https://github.com/rossmacarthur/sheldon/archive/$pkgver/sheldon-$pkgver
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1  # use system libssh2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/skim/APKBUILD b/community/skim/APKBUILD
index fe1c04f7ecbe..c715a4c8fd65 100644
--- a/community/skim/APKBUILD
+++ b/community/skim/APKBUILD
@@ -30,6 +30,8 @@ case "$CARCH" in
 	armhf | armv7 | x86) options="!check";;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/sn0int/APKBUILD b/community/sn0int/APKBUILD
index cc2d8fd0755b..1ff010b79642 100644
--- a/community/sn0int/APKBUILD
+++ b/community/sn0int/APKBUILD
@@ -26,6 +26,8 @@ subpackages="$pkgname-doc
 options="net"
 source="$pkgname-$pkgver.tar.gz::https://github.com/kpcyrd/sn0int/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 
diff --git a/community/sniffglue/APKBUILD b/community/sniffglue/APKBUILD
index 12dbab047c1c..274cad76a19d 100644
--- a/community/sniffglue/APKBUILD
+++ b/community/sniffglue/APKBUILD
@@ -21,6 +21,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/kpcyrd/sniffglue/archive/v$p
 	sniffglue.conf
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 	make docs
diff --git a/community/songrec/APKBUILD b/community/songrec/APKBUILD
index cac0bfc3136b..c21a97ef7006 100644
--- a/community/songrec/APKBUILD
+++ b/community/songrec/APKBUILD
@@ -24,6 +24,8 @@ source="https://github.com/marin-m/songrec/archive/$pkgver/songrec-$pkgver.tar.g
 options="net !check"
 builddir="$srcdir/SongRec-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/community/spot/APKBUILD b/community/spot/APKBUILD
index 9524e4ce69ef..95d1ba06ac0d 100644
--- a/community/spot/APKBUILD
+++ b/community/spot/APKBUILD
@@ -28,6 +28,8 @@ source="https://github.com/xou816/spot/archive/$pkgver/spot-$pkgver.tar.gz
 	"
 options="net" # cargo fetch
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	# NOTE: buildtype must be release!
 	abuild-meson \
diff --git a/community/squeekboard/APKBUILD b/community/squeekboard/APKBUILD
index 871738f75680..e87c1b3b6094 100644
--- a/community/squeekboard/APKBUILD
+++ b/community/squeekboard/APKBUILD
@@ -29,6 +29,8 @@ subpackages="$pkgname-lang"
 source="https://gitlab.gnome.org/World/Phosh/squeekboard/-/archive/v$pkgver/squeekboard-v$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-v$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson -Dstrict=false . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/stargazer-gmi/APKBUILD b/community/stargazer-gmi/APKBUILD
index d2af8be22669..ffbd00e73e37 100644
--- a/community/stargazer-gmi/APKBUILD
+++ b/community/stargazer-gmi/APKBUILD
@@ -19,6 +19,8 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~zethra/stargazer/archive/$pk
 builddir="$srcdir/stargazer-$pkgver"
 options="!check" # connection refused to localhost
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	./scripts/build
 }
diff --git a/community/starship/APKBUILD b/community/starship/APKBUILD
index b3cb8244c17e..95ffd4a697ef 100644
--- a/community/starship/APKBUILD
+++ b/community/starship/APKBUILD
@@ -30,6 +30,8 @@ options="net" # fetching dependencies
 # http feature is used just for reporting bugs
 _cargo_opts="--frozen --no-default-features --features notify"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	cargo fetch --target="$CTARGET" --locked
 
diff --git a/community/stylua/APKBUILD b/community/stylua/APKBUILD
index d4aee5e026ec..2ae22d4c3d0e 100644
--- a/community/stylua/APKBUILD
+++ b/community/stylua/APKBUILD
@@ -13,6 +13,8 @@ builddir="$srcdir/StyLua-$pkgver"
 
 _features="--no-default-features --features lua54,strum,serialize"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/suricata/APKBUILD b/community/suricata/APKBUILD
index 117f369931b9..7f9dc613d259 100644
--- a/community/suricata/APKBUILD
+++ b/community/suricata/APKBUILD
@@ -63,6 +63,8 @@ case "$CARCH" in
 		makedepends="$makedepends vectorscan-dev" ;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	autoreconf -vif
diff --git a/community/swayr/APKBUILD b/community/swayr/APKBUILD
index d2cc1f337672..d21d75fe56f7 100644
--- a/community/swayr/APKBUILD
+++ b/community/swayr/APKBUILD
@@ -22,6 +22,7 @@ esac
 #     - CVE-2022-24713
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/swayrbar/APKBUILD b/community/swayrbar/APKBUILD
index 9b630100010d..49a81391fa0d 100644
--- a/community/swayrbar/APKBUILD
+++ b/community/swayrbar/APKBUILD
@@ -12,6 +12,7 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~tsdh/swayr/archive/swayrbar-
 builddir="$srcdir/swayr-swayrbar-$pkgver"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/taplo/APKBUILD b/community/taplo/APKBUILD
index c1e7e4134e2b..b747bb8b8a37 100644
--- a/community/taplo/APKBUILD
+++ b/community/taplo/APKBUILD
@@ -20,6 +20,8 @@ export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
 
 _cargo_opts="--frozen --no-default-features --features native-tls"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/tau/APKBUILD b/community/tau/APKBUILD
index bf416b8cf85d..e8941a037305 100644
--- a/community/tau/APKBUILD
+++ b/community/tau/APKBUILD
@@ -30,6 +30,8 @@ source="https://gitlab.gnome.org/World/Tau/uploads/$_sha/tau-$pkgver.tar.xz
 	meson-0.60.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/community/tectonic/APKBUILD b/community/tectonic/APKBUILD
index 91640bbc84ac..104895503686 100644
--- a/community/tectonic/APKBUILD
+++ b/community/tectonic/APKBUILD
@@ -23,6 +23,8 @@ source="
 builddir="$srcdir/tectonic-tectonic-$pkgver"
 options="!check" # needs unpackages ubuntu mono font
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/thin-provisioning-tools/APKBUILD b/community/thin-provisioning-tools/APKBUILD
index 60ed31109e0c..2c78b811ab02 100644
--- a/community/thin-provisioning-tools/APKBUILD
+++ b/community/thin-provisioning-tools/APKBUILD
@@ -23,6 +23,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/thunderbird/APKBUILD b/community/thunderbird/APKBUILD
index 2e4cf45627ed..e511798e231f 100644
--- a/community/thunderbird/APKBUILD
+++ b/community/thunderbird/APKBUILD
@@ -335,6 +335,8 @@ sonameprefix="$pkgname:"
 # we need this because cargo verifies checksums of all files in vendor
 # crates when it builds and gives us no way to override or update the
 # file sanely... so just clear out the file list
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 _clear_vendor_checksums() {
 	sed -i 's/\("files":{\)[^}]*/\1/' third_party/rust/$1/.cargo-checksum.json
 }
diff --git a/community/tokei/APKBUILD b/community/tokei/APKBUILD
index 4f8ab9a55466..4aa22d4bad07 100644
--- a/community/tokei/APKBUILD
+++ b/community/tokei/APKBUILD
@@ -12,6 +12,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/XAMPPRocky/tokei/archive/v$p
 	minimize-size.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked --features all
 }
diff --git a/community/tree-sitter/APKBUILD b/community/tree-sitter/APKBUILD
index 9a68e88fdb53..ebca90804653 100644
--- a/community/tree-sitter/APKBUILD
+++ b/community/tree-sitter/APKBUILD
@@ -37,6 +37,8 @@ case "$CARCH" in
 	aarch64 | arm* | ppc64le) options="!check";;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/tuc/APKBUILD b/community/tuc/APKBUILD
index aba7b0a121f5..def28d7ffb65 100644
--- a/community/tuc/APKBUILD
+++ b/community/tuc/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo"
 source="https://github.com/riquito/tuc/archive/v$pkgver/tuc-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/viu/APKBUILD b/community/viu/APKBUILD
index 596bda820f4e..a9efa9bcf796 100644
--- a/community/viu/APKBUILD
+++ b/community/viu/APKBUILD
@@ -10,6 +10,8 @@ makedepends="cargo"
 subpackages="$pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://github.com/atanunq/viu/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/warp/APKBUILD b/community/warp/APKBUILD
index 15bb12242f6d..4a56ee83dec6 100644
--- a/community/warp/APKBUILD
+++ b/community/warp/APKBUILD
@@ -22,6 +22,8 @@ source="https://gitlab.gnome.org/World/warp/-/archive/v$pkgver/warp-v$pkgver.tar
 builddir="$srcdir/warp-v$pkgver"
 options="!check" # no tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson \
 		-Db_lto=true \
diff --git a/community/wasm-pack/APKBUILD b/community/wasm-pack/APKBUILD
index aeb0c7c0e1ef..b1b540019a96 100644
--- a/community/wasm-pack/APKBUILD
+++ b/community/wasm-pack/APKBUILD
@@ -16,6 +16,7 @@ source="https://github.com/rustwasm/wasm-pack/archive/refs/tags/v$pkgver/wasm-pa
 options="!check" # most tests fail outside of x86_64
 
 export OPENSSL_NO_VENDOR=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/wayshot/APKBUILD b/community/wayshot/APKBUILD
index 97d29b649d84..e80d43afdebb 100644
--- a/community/wayshot/APKBUILD
+++ b/community/wayshot/APKBUILD
@@ -14,6 +14,8 @@ makedepends="cargo"
 source="https://github.com/waycrate/wayshot/archive/$pkgver/wayshot-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/websocat/APKBUILD b/community/websocat/APKBUILD
index bbf335575e7c..81618ddb01a2 100644
--- a/community/websocat/APKBUILD
+++ b/community/websocat/APKBUILD
@@ -10,6 +10,8 @@ makedepends="cargo openssl-dev>3"
 options="net"
 source="https://github.com/vi/websocat/archive/v$pkgver/websocat-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/community/wezterm/APKBUILD b/community/wezterm/APKBUILD
index aea77e9d8eb1..8fff63a5c8b7 100644
--- a/community/wezterm/APKBUILD
+++ b/community/wezterm/APKBUILD
@@ -66,6 +66,7 @@ source="
 builddir="$srcdir/wezterm-$_pkgver"
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1  # use system libssh2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	cargo fetch --target="$CTARGET" --locked
diff --git a/community/wldash/APKBUILD b/community/wldash/APKBUILD
index 0cf6ecbfc278..591b3ef2b34c 100644
--- a/community/wldash/APKBUILD
+++ b/community/wldash/APKBUILD
@@ -24,6 +24,8 @@ source="https://github.com/kennylevinsen/wldash/archive/v$pkgver/$pkgname-$pkgve
 	"
 options="!check"  # there are currently no tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/wluma/APKBUILD b/community/wluma/APKBUILD
index f449cb60d766..b43c57c87f3e 100644
--- a/community/wluma/APKBUILD
+++ b/community/wluma/APKBUILD
@@ -31,6 +31,8 @@ source="https://github.com/maximbaz/wluma/archive/$pkgver/wluma-$pkgver.tar.gz
 	libv4l-rs-02-fix-wrong-_IOC_TYPE-on-musl.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	mv ../libv4l-rs-$_libv4l_gitrev "$builddir"/libv4l-rs
 
diff --git a/community/xh/APKBUILD b/community/xh/APKBUILD
index be82598eb57d..c356b77a7258 100644
--- a/community/xh/APKBUILD
+++ b/community/xh/APKBUILD
@@ -28,6 +28,8 @@ export RUSTONIG_DYNAMIC_LIBONIG=1
 
 _cargo_opts="--frozen --no-default-features --features native-tls"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/xsv/APKBUILD b/community/xsv/APKBUILD
index d8d6f4398d44..ebc8b0c3be31 100644
--- a/community/xsv/APKBUILD
+++ b/community/xsv/APKBUILD
@@ -13,6 +13,7 @@ makedepends="cargo"
 source="https://github.com/BurntSushi/xsv/archive/$pkgver/$pkgname-$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/yj/APKBUILD b/community/yj/APKBUILD
index 7d16d7a70e13..0e15d3f34722 100644
--- a/community/yj/APKBUILD
+++ b/community/yj/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="https://github.com/bruceadams/yj/archive/v$pkgver/yj-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/yofi/APKBUILD b/community/yofi/APKBUILD
index 56aa602aaecd..7c6964399d11 100644
--- a/community/yofi/APKBUILD
+++ b/community/yofi/APKBUILD
@@ -22,6 +22,8 @@ source="https://github.com/l4l/yofi/archive/$pkgver/yofi-$pkgver.tar.gz
 # font-fontkit loads fonts via system libraries.
 _cargo_opts="--frozen --no-default-features --features=font-fontkit"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	cargo fetch --target="$CTARGET" --locked
 	default_prepare
diff --git a/community/zellij/APKBUILD b/community/zellij/APKBUILD
index ee041074ad5b..579767de40ca 100644
--- a/community/zellij/APKBUILD
+++ b/community/zellij/APKBUILD
@@ -35,6 +35,8 @@ aarch64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/zenith/APKBUILD b/community/zenith/APKBUILD
index 14f28dd0616e..79092755ddf4 100644
--- a/community/zenith/APKBUILD
+++ b/community/zenith/APKBUILD
@@ -18,6 +18,8 @@ makedepends="
 source="https://github.com/bvaisvil/zenith/archive/$pkgver/zenith-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/community/zerotier-one/APKBUILD b/community/zerotier-one/APKBUILD
index b27bfcbfd23f..066ce7184a34 100644
--- a/community/zerotier-one/APKBUILD
+++ b/community/zerotier-one/APKBUILD
@@ -14,6 +14,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/zerotier/ZeroTierOne/archive
 	"
 builddir="$srcdir"/ZeroTierOne-$pkgver
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	make
 }
diff --git a/community/zola/APKBUILD b/community/zola/APKBUILD
index a85f9633ca8b..09de5bb87bb8 100644
--- a/community/zola/APKBUILD
+++ b/community/zola/APKBUILD
@@ -26,6 +26,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/getzola/zola/archive/v$pkgve
 options="net" # fetch dependencies
 
 export RUSTONIG_SYSTEM_LIBONIG=1 # Link against system liboniguruma
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/community/zoxide/APKBUILD b/community/zoxide/APKBUILD
index f63bb9df9611..a3a21eb8eecc 100644
--- a/community/zoxide/APKBUILD
+++ b/community/zoxide/APKBUILD
@@ -24,6 +24,8 @@ export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/acmed/APKBUILD b/testing/acmed/APKBUILD
index 60fc0e35324e..991636e76c16 100644
--- a/testing/acmed/APKBUILD
+++ b/testing/acmed/APKBUILD
@@ -19,6 +19,8 @@ source="https://github.com/breard-r/acmed/archive/refs/tags/v$pkgver/acmed-$pkgv
 	acmed.initd
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	mv "$srcdir"/Cargo.lock .
diff --git a/testing/android-apkeep/APKBUILD b/testing/android-apkeep/APKBUILD
index 5e5558526269..33a720491b92 100644
--- a/testing/android-apkeep/APKBUILD
+++ b/testing/android-apkeep/APKBUILD
@@ -18,6 +18,8 @@ source="https://github.com/EFForg/apkeep/archive/refs/tags/$pkgver/apkeep-$pkgve
 options="!check"	# no tests
 builddir="$srcdir/apkeep-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/apmpkg/APKBUILD b/testing/apmpkg/APKBUILD
index c027e9ca76f4..69e8dbf822b9 100644
--- a/testing/apmpkg/APKBUILD
+++ b/testing/apmpkg/APKBUILD
@@ -21,6 +21,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/Kedap/apmpkg/archive/refs/ta
 	fix-with-outdated-rust.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked --verbose
 }
diff --git a/testing/asciinema-rs/APKBUILD b/testing/asciinema-rs/APKBUILD
index 34fe4be03745..7595959b4e44 100644
--- a/testing/asciinema-rs/APKBUILD
+++ b/testing/asciinema-rs/APKBUILD
@@ -13,6 +13,8 @@ source="https://github.com/LegNeato/asciinema-rs/archive/v$pkgver/asciinema-rs-v
 	 "
 options="!check" # fail on 'home'
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/asuran-cli/APKBUILD b/testing/asuran-cli/APKBUILD
index adc25239936b..826def341d14 100644
--- a/testing/asuran-cli/APKBUILD
+++ b/testing/asuran-cli/APKBUILD
@@ -22,6 +22,7 @@ source="https://gitlab.com/asuran-rs/asuran/-/archive/v$pkgver/asuran-v$pkgver.t
 builddir="$srcdir/asuran-v$pkgver"
 
 export LIBSSH2_SYS_USE_PKG_CONFIG=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/authenticator-rs/APKBUILD b/testing/authenticator-rs/APKBUILD
index 1f6e581a8a62..c27402885045 100644
--- a/testing/authenticator-rs/APKBUILD
+++ b/testing/authenticator-rs/APKBUILD
@@ -22,6 +22,8 @@ options="net !check" # No tests
 
 # size optimisations
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	RELEASE_VERSION=$pkgver make release-version
 	make release
diff --git a/testing/bartib/APKBUILD b/testing/bartib/APKBUILD
index f202db26a93b..35c9d659ec8a 100644
--- a/testing/bartib/APKBUILD
+++ b/testing/bartib/APKBUILD
@@ -10,6 +10,8 @@ license="GPL-3.0-or-later"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/nikolassv/bartib/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/beancount-language-server/APKBUILD b/testing/beancount-language-server/APKBUILD
index a4ec957aee04..6c5ba5a35219 100644
--- a/testing/beancount-language-server/APKBUILD
+++ b/testing/beancount-language-server/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="https://github.com/polarmutex/beancount-language-server/archive/v$pkgver/beancount-language-server-$pkgver.tar.gz"
 options="!check" # no test suite
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/boa-cli/APKBUILD b/testing/boa-cli/APKBUILD
index 24234a709ecd..14b4821dc76e 100644
--- a/testing/boa-cli/APKBUILD
+++ b/testing/boa-cli/APKBUILD
@@ -13,6 +13,8 @@ makedepends="cargo"
 source="https://github.com/boa-dev/boa/archive/refs/tags/v$pkgver/boa-$pkgver.tar.gz"
 builddir="$srcdir/boa-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/bore/APKBUILD b/testing/bore/APKBUILD
index 4547e9e60d3a..85871c346597 100644
--- a/testing/bore/APKBUILD
+++ b/testing/bore/APKBUILD
@@ -11,6 +11,8 @@ license="MIT"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/ekzhang/bore/archive/v$pkgver/bore-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/cargo-deny/APKBUILD b/testing/cargo-deny/APKBUILD
index 35d61f356654..e1bcc7cd2606 100644
--- a/testing/cargo-deny/APKBUILD
+++ b/testing/cargo-deny/APKBUILD
@@ -25,6 +25,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/castor/APKBUILD b/testing/castor/APKBUILD
index 3fd1e579a255..8cac176e9287 100644
--- a/testing/castor/APKBUILD
+++ b/testing/castor/APKBUILD
@@ -9,6 +9,8 @@ arch="all !s390x !riscv64" # limited by rust/cargo
 makedepends="rust cargo gtk+3.0-dev openssl-dev>3"
 source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~julienxx/castor/archive/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked --verbose
 }
diff --git a/testing/chim/APKBUILD b/testing/chim/APKBUILD
index afb8ce7247ab..02a7bd77759b 100644
--- a/testing/chim/APKBUILD
+++ b/testing/chim/APKBUILD
@@ -15,6 +15,8 @@ makedepends="
 subpackages="$pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://github.com/jdxcode/chim/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/cicada/APKBUILD b/testing/cicada/APKBUILD
index fb215854937e..3d03033d4838 100644
--- a/testing/cicada/APKBUILD
+++ b/testing/cicada/APKBUILD
@@ -18,6 +18,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/mitnk/cicada/archive/v$pkgve
 	unbundle-sqlite.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/cinny/APKBUILD b/testing/cinny/APKBUILD
index 9e25f2d89d3a..847bc3d62542 100644
--- a/testing/cinny/APKBUILD
+++ b/testing/cinny/APKBUILD
@@ -33,6 +33,7 @@ _rustdir="$builddir/src-tauri"
 options="net !check" # no checks
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/conduit/APKBUILD b/testing/conduit/APKBUILD
index a3c8e377a6d5..df028e665ad3 100644
--- a/testing/conduit/APKBUILD
+++ b/testing/conduit/APKBUILD
@@ -23,6 +23,8 @@ options="net"
 
 _features="--no-default-features --features=conduit_bin,backend_sqlite"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/desed/APKBUILD b/testing/desed/APKBUILD
index a0e24177aa7b..e7066ee5b346 100644
--- a/testing/desed/APKBUILD
+++ b/testing/desed/APKBUILD
@@ -15,6 +15,8 @@ source="https://github.com/SoptikHa2/desed/archive/v$pkgver/desed-$pkgver.tar.gz
 	Cargo.lock
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/diskonaut/APKBUILD b/testing/diskonaut/APKBUILD
index faddafff495a..21e35fd2b8af 100644
--- a/testing/diskonaut/APKBUILD
+++ b/testing/diskonaut/APKBUILD
@@ -10,6 +10,8 @@ makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/imsnif/diskonaut/archive/refs/tags/$pkgver.tar.gz"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/diskus/APKBUILD b/testing/diskus/APKBUILD
index a113e6c54717..ab719ed8d133 100644
--- a/testing/diskus/APKBUILD
+++ b/testing/diskus/APKBUILD
@@ -11,6 +11,8 @@ license="MIT"
 makedepends="cargo"
 source="$pkgname-$pkgdir.tar.gz::https://github.com/sharkdp/diskus/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/dotenv-linter/APKBUILD b/testing/dotenv-linter/APKBUILD
index 81886bddb10c..3ba577caad2b 100644
--- a/testing/dotenv-linter/APKBUILD
+++ b/testing/dotenv-linter/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="https://github.com/dotenv-linter/dotenv-linter/archive/refs/tags/v$pkgver/dotenv-linter-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/dum/APKBUILD b/testing/dum/APKBUILD
index 11f8a20a83c2..4cb48de5ffbd 100644
--- a/testing/dum/APKBUILD
+++ b/testing/dum/APKBUILD
@@ -12,6 +12,8 @@ source="https://github.com/egoist/dum/archive/v$pkgver/dum-$pkgver.tar.gz
 	strip-env_logger-features.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/electron-tasje/APKBUILD b/testing/electron-tasje/APKBUILD
index ccea55e3e066..ed8d0268ac85 100644
--- a/testing/electron-tasje/APKBUILD
+++ b/testing/electron-tasje/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="electron_tasje-$pkgver.tar.gz::https://codeberg.org/selfisekai/electron_tasje/archive/v$pkgver.tar.gz"
 builddir="$srcdir/electron_tasje"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/element-desktop/APKBUILD b/testing/element-desktop/APKBUILD
index 1bf3456c46fe..01b2860c451e 100644
--- a/testing/element-desktop/APKBUILD
+++ b/testing/element-desktop/APKBUILD
@@ -57,6 +57,7 @@ export VERSION=$pkgver
 export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
 export CARGO_PROFILE_RELEASE_STRIP="symbols"
 export NODE_OPTIONS="--openssl-legacy-provider"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	msg "Applying patches"
diff --git a/testing/elfx86exts/APKBUILD b/testing/elfx86exts/APKBUILD
index 0006f02bf1da..1a03ff1f2a4b 100644
--- a/testing/elfx86exts/APKBUILD
+++ b/testing/elfx86exts/APKBUILD
@@ -12,6 +12,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/pkgw/elfx86exts/archive/refs
 builddir="$srcdir/$pkgname-$pkgname-$pkgver"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/eva/APKBUILD b/testing/eva/APKBUILD
index c02b485809ad..1dd443e865ca 100644
--- a/testing/eva/APKBUILD
+++ b/testing/eva/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # limited by rust/cargo
 makedepends="cargo"
 source="https://github.com/nerdypepper/eva/archive/v$pkgver/eva-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/ffsend/APKBUILD b/testing/ffsend/APKBUILD
index 203b27c304c9..2a97766f7685 100644
--- a/testing/ffsend/APKBUILD
+++ b/testing/ffsend/APKBUILD
@@ -25,6 +25,8 @@ builddir="$srcdir/$pkgname-v$pkgver"
 # The default features with crypto-ring replaced with crypto-openssl.
 _cargo_opts="--frozen --no-default-features --features=archive,clipboard,crypto-openssl,history,infer-command,qrcode,send3,urlshortener"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/filite/APKBUILD b/testing/filite/APKBUILD
index 388396a80676..43bb2bacf78e 100644
--- a/testing/filite/APKBUILD
+++ b/testing/filite/APKBUILD
@@ -13,6 +13,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/raftario/filite/archive/refs
 	system-sqlite.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/firecracker/APKBUILD b/testing/firecracker/APKBUILD
index 5f34604bf4fc..bf6c25c3e635 100644
--- a/testing/firecracker/APKBUILD
+++ b/testing/firecracker/APKBUILD
@@ -14,6 +14,8 @@ subpackages="
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/firecracker-microvm/firecracker/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/firefox-developer-edition/APKBUILD b/testing/firefox-developer-edition/APKBUILD
index 70c214165833..db5a9b267eb7 100644
--- a/testing/firefox-developer-edition/APKBUILD
+++ b/testing/firefox-developer-edition/APKBUILD
@@ -93,6 +93,7 @@ _clear_vendor_checksums() {
 
 export CFLAGS="$CFLAGS -O2"
 export CXXFLAGS="$CXXFLAGS -O2"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/flare/APKBUILD b/testing/flare/APKBUILD
index b4910b7ac585..afb992a84be3 100644
--- a/testing/flare/APKBUILD
+++ b/testing/flare/APKBUILD
@@ -25,6 +25,8 @@ source="https://gitlab.com/Schmiddiii/flare/-/archive/$pkgver/flare-$pkgver.tar.
 # no tests
 options="!check"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/geckodriver/APKBUILD b/testing/geckodriver/APKBUILD
index da8e23faf6ee..5b4ad87669bb 100644
--- a/testing/geckodriver/APKBUILD
+++ b/testing/geckodriver/APKBUILD
@@ -11,6 +11,8 @@ license="MPL"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/geckodriver/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --bin geckodriver
 }
diff --git a/testing/geopard/APKBUILD b/testing/geopard/APKBUILD
index 81b5550b9b7a..0f17ab65325c 100644
--- a/testing/geopard/APKBUILD
+++ b/testing/geopard/APKBUILD
@@ -20,6 +20,8 @@ makedepends="
 source="$pkgname-$pkgver.tar.xz::https://github.com/ranfdev/Geopard/releases/download/v$pkgver/com.ranfdev.Geopard.tar.xz"
 options="!check" # no test suite
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	rm -rf "$builddir"/subprojects/blueprint-compiler
diff --git a/testing/gitoxide/APKBUILD b/testing/gitoxide/APKBUILD
index d53e09e60df6..0c3cc61bb0d5 100644
--- a/testing/gitoxide/APKBUILD
+++ b/testing/gitoxide/APKBUILD
@@ -32,6 +32,8 @@ export CARGO_PROFILE_RELEASE_PANIC="unwind"
 
 _cargo_opts="--frozen --no-default-features --features lean"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/gleam/APKBUILD b/testing/gleam/APKBUILD
index 2cd479027dab..73b42aeaf051 100644
--- a/testing/gleam/APKBUILD
+++ b/testing/gleam/APKBUILD
@@ -13,6 +13,8 @@ depends="erlang-dev"
 makedepends="cargo"
 source="$pkgname-$pkgver-2.tar.gz::https://github.com/gleam-lang/gleam/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/gnome-metronome/APKBUILD b/testing/gnome-metronome/APKBUILD
index cce7b1222b94..13bf83f88daa 100644
--- a/testing/gnome-metronome/APKBUILD
+++ b/testing/gnome-metronome/APKBUILD
@@ -22,6 +22,8 @@ makedepends="
 source="https://gitlab.gnome.org/World/metronome/-/archive/$pkgver/metronome-$pkgver.tar.gz"
 builddir="$srcdir/metronome-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson build
 	meson compile ${JOBS:+-j ${JOBS}} -C build
diff --git a/testing/gobang/APKBUILD b/testing/gobang/APKBUILD
index 81b7ba075a97..953c05e7a370 100644
--- a/testing/gobang/APKBUILD
+++ b/testing/gobang/APKBUILD
@@ -16,6 +16,8 @@ source="https://github.com/TaKO8Ki/gobang/archive/refs/tags/v$_pkgver/gobang-v$_
 options="!check" # no test suite
 builddir="$srcdir/$pkgname-$_pkgver/"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/gpg-tui/APKBUILD b/testing/gpg-tui/APKBUILD
index a4dc8c5ea7c7..5bad5a1d5426 100644
--- a/testing/gpg-tui/APKBUILD
+++ b/testing/gpg-tui/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 	"
 source="https://github.com/orhun/gpg-tui/archive/v$pkgver/gpg-tui-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 
diff --git a/testing/gping/APKBUILD b/testing/gping/APKBUILD
index 93097e499027..57a4d2425c9a 100644
--- a/testing/gping/APKBUILD
+++ b/testing/gping/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="https://github.com/orf/gping/archive/gping-v$pkgver/gping-$pkgver.tar.gz"
 builddir="$srcdir/gping-gping-v$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/grcov/APKBUILD b/testing/grcov/APKBUILD
index 20c5b851f55b..ef0231897eaa 100644
--- a/testing/grcov/APKBUILD
+++ b/testing/grcov/APKBUILD
@@ -12,6 +12,8 @@ makedepends="cargo"
 options="net !check" # Failing due to utf-8 (locale?)
 source="$pkgname-$pkgver.tar.gz::https://github.com/mozilla/grcov/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/greetd-wlgreet/APKBUILD b/testing/greetd-wlgreet/APKBUILD
index 0c9ee2d6e3c1..6057a850ab6a 100644
--- a/testing/greetd-wlgreet/APKBUILD
+++ b/testing/greetd-wlgreet/APKBUILD
@@ -24,6 +24,7 @@ builddir="$srcdir/$_projname-$pkgver"
 options="!check"  # no tests provided
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/grpc-health-check/APKBUILD b/testing/grpc-health-check/APKBUILD
index cc42ab65a583..292956cf0968 100644
--- a/testing/grpc-health-check/APKBUILD
+++ b/testing/grpc-health-check/APKBUILD
@@ -9,6 +9,8 @@ license="Apache-2.0"
 makedepends="cargo protoc rustfmt"
 source="$pkgname-$pkgver.tar.gz::https://github.com/paypizza/grpc-health-check/archive/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET"
diff --git a/testing/gst-plugins-rs/APKBUILD b/testing/gst-plugins-rs/APKBUILD
index 658fa159817b..5010953ff33b 100644
--- a/testing/gst-plugins-rs/APKBUILD
+++ b/testing/gst-plugins-rs/APKBUILD
@@ -26,6 +26,7 @@ source="https://gitlab.freedesktop.org/gstreamer/gst-plugins-rs/-/archive/$pkgve
 options="net !check" # they don't run
 
 export SODIUM_USE_PKG_CONFIG=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/habitctl/APKBUILD b/testing/habitctl/APKBUILD
index 510ede6e1e3b..05e5765a8ade 100644
--- a/testing/habitctl/APKBUILD
+++ b/testing/habitctl/APKBUILD
@@ -10,6 +10,8 @@ makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/blinry/$pkgname/archive/refs/tags/$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/helvum/APKBUILD b/testing/helvum/APKBUILD
index a027fa668eec..f1da3b85bfb1 100644
--- a/testing/helvum/APKBUILD
+++ b/testing/helvum/APKBUILD
@@ -12,6 +12,8 @@ makedepends="bash cargo desktop-file-utils meson clang-dev glib-dev gtk4.0-dev p
 source="https://gitlab.freedesktop.org/pipewire/helvum/-/archive/$pkgver/helvum-$pkgver.tar.gz"
 options="!check" # no test suite
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/testing/hex/APKBUILD b/testing/hex/APKBUILD
index e1219b5babab..7c0d3e328f8a 100644
--- a/testing/hex/APKBUILD
+++ b/testing/hex/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/sitkevij/hex/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/horust/APKBUILD b/testing/horust/APKBUILD
index 94c93c8c06ce..f2590e7dbf01 100644
--- a/testing/horust/APKBUILD
+++ b/testing/horust/APKBUILD
@@ -17,6 +17,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/FedericoPonzi/Horust/archive
 	"
 builddir="$srcdir/Horust-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/htmlq/APKBUILD b/testing/htmlq/APKBUILD
index bb85f5177d6d..e2a7e6ad6478 100644
--- a/testing/htmlq/APKBUILD
+++ b/testing/htmlq/APKBUILD
@@ -11,6 +11,8 @@ options="!check" # no test suite
 makedepends="cargo"
 source="https://github.com/mgdm/htmlq/archive/v$pkgver/htmlq-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/hwatch/APKBUILD b/testing/hwatch/APKBUILD
index fc27564d3617..ea0346c99acd 100644
--- a/testing/hwatch/APKBUILD
+++ b/testing/hwatch/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 source="https://github.com/blacknon/hwatch/archive/refs/tags/$pkgver/hwatch-$pkgver.tar.gz"
 options="!check"  # no tests provided
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/hyperlink/APKBUILD b/testing/hyperlink/APKBUILD
index 40b224560a57..b93c773e6bab 100644
--- a/testing/hyperlink/APKBUILD
+++ b/testing/hyperlink/APKBUILD
@@ -11,6 +11,8 @@ license="MIT"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/untitaker/hyperlink/archive/refs/tags/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/i3status-rust/APKBUILD b/testing/i3status-rust/APKBUILD
index 5ae321294e6b..2e204bff4092 100644
--- a/testing/i3status-rust/APKBUILD
+++ b/testing/i3status-rust/APKBUILD
@@ -22,6 +22,8 @@ provides="i3status-rs=$pkgver-r$pkgrel"
 subpackages="$pkgname-doc"
 source="https://github.com/greshake/i3status-rust/archive/refs/tags/v$pkgver/i3status-rust-v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/imageflow/APKBUILD b/testing/imageflow/APKBUILD
index 09ef23d702ef..11ab9a81e0fa 100644
--- a/testing/imageflow/APKBUILD
+++ b/testing/imageflow/APKBUILD
@@ -16,6 +16,8 @@ subpackages="$pkgname-server:_server
 	$pkgname-tool:_tool
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	# Workaround for environment consistency checks in build
 	touch .git
diff --git a/testing/innernet/APKBUILD b/testing/innernet/APKBUILD
index 5c6c0f1c3305..370e3dae83d0 100644
--- a/testing/innernet/APKBUILD
+++ b/testing/innernet/APKBUILD
@@ -20,6 +20,8 @@ subpackages="$pkgname-openrc $pkgname-doc $pkgname-bash-completion $pkgname-fish
 
 [ "$CARCH" = riscv64 ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/jaq/APKBUILD b/testing/jaq/APKBUILD
index c5aa643a3556..bcb961812c77 100644
--- a/testing/jaq/APKBUILD
+++ b/testing/jaq/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="https://github.com/01mf02/jaq/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/java-libsignal-client/APKBUILD b/testing/java-libsignal-client/APKBUILD
index 3d2caeeaf20f..789399936cd8 100644
--- a/testing/java-libsignal-client/APKBUILD
+++ b/testing/java-libsignal-client/APKBUILD
@@ -21,6 +21,8 @@ builddir="$srcdir/libsignal-$pkgver/java"
 # tests succeed, but gradle aborts with exit value 134. have to further investigate later
 options="!check"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	./gradlew --no-daemon :client:jar
 }
diff --git a/testing/jp/APKBUILD b/testing/jp/APKBUILD
index e4df63fef5cc..c6e6bb98499d 100644
--- a/testing/jp/APKBUILD
+++ b/testing/jp/APKBUILD
@@ -18,6 +18,8 @@ case "$CARCH" in
 	riscv64) options="$options textrels" ;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/jrsonnet-cli/APKBUILD b/testing/jrsonnet-cli/APKBUILD
index 56e9ed287f1c..b7e802285cbb 100644
--- a/testing/jrsonnet-cli/APKBUILD
+++ b/testing/jrsonnet-cli/APKBUILD
@@ -12,6 +12,8 @@ makedepends="cargo"
 source="https://github.com/CertainLach/jrsonnet/archive/refs/tags/v$pkgver/jrsonnet-v$pkgver.tar.gz"
 builddir="$srcdir/jrsonnet-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/kak-lsp/APKBUILD b/testing/kak-lsp/APKBUILD
index 0d2a8cf8ab95..cdee34867c2e 100644
--- a/testing/kak-lsp/APKBUILD
+++ b/testing/kak-lsp/APKBUILD
@@ -10,6 +10,8 @@ license="Unlicense OR MIT"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/kak-lsp/kak-lsp/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/kbs2/APKBUILD b/testing/kbs2/APKBUILD
index 74e3fee2a91b..fa99bade49b1 100644
--- a/testing/kbs2/APKBUILD
+++ b/testing/kbs2/APKBUILD
@@ -15,6 +15,8 @@ subpackages="
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/woodruffw/kbs2/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/lapce/APKBUILD b/testing/lapce/APKBUILD
index 9fbd46c7ed9f..a07e952a8484 100644
--- a/testing/lapce/APKBUILD
+++ b/testing/lapce/APKBUILD
@@ -84,6 +84,8 @@ _cargo_features="
 	lang-zig
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/laze/APKBUILD b/testing/laze/APKBUILD
index 2394d9e54386..7a1940dc6ac7 100644
--- a/testing/laze/APKBUILD
+++ b/testing/laze/APKBUILD
@@ -23,6 +23,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/librespot/APKBUILD b/testing/librespot/APKBUILD
index ba63e2a30f2f..67e2840b6c40 100644
--- a/testing/librespot/APKBUILD
+++ b/testing/librespot/APKBUILD
@@ -16,6 +16,8 @@ source="librespot-$pkgver.tar.gz::https://github.com/librespot-org/librespot/arc
 	$pkgname.confd
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/lighthouse/APKBUILD b/testing/lighthouse/APKBUILD
index fea96a893052..9e399c8f988a 100644
--- a/testing/lighthouse/APKBUILD
+++ b/testing/lighthouse/APKBUILD
@@ -25,6 +25,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/sigp/lighthouse/archive/v$pk
 
 export OPENSSL_NO_VENDOR=true
 export RUSTFLAGS="$RUSTFLAGS -L /usr/lib/"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/lsd/APKBUILD b/testing/lsd/APKBUILD
index d62fce11fa9d..85aa40ef5ec8 100644
--- a/testing/lsd/APKBUILD
+++ b/testing/lsd/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="https://github.com/Peltoche/$pkgname/archive/refs/tags/$pkgver/lsd-$pkgver.tar.gz"
 options="net" # needed for downloading dependencies
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/lumins/APKBUILD b/testing/lumins/APKBUILD
index 19f1910bc2e2..c8c1d7ac2e07 100644
--- a/testing/lumins/APKBUILD
+++ b/testing/lumins/APKBUILD
@@ -12,6 +12,8 @@ makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/wchang22/LuminS/archive/refs/tags/v$pkgver.tar.gz"
 builddir="$srcdir/LuminS-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/macchina/APKBUILD b/testing/macchina/APKBUILD
index 637c094543d8..9222eef381d6 100644
--- a/testing/macchina/APKBUILD
+++ b/testing/macchina/APKBUILD
@@ -13,6 +13,8 @@ options="net"
 subpackages="$pkgname-doc"
 source="$pkgname-$pkgver.tar.gz::https://github.com/Macchina-CLI/macchina/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/mdcat/APKBUILD b/testing/mdcat/APKBUILD
index 99bd9051820a..ed86ac87e6a5 100644
--- a/testing/mdcat/APKBUILD
+++ b/testing/mdcat/APKBUILD
@@ -24,6 +24,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/navi/APKBUILD b/testing/navi/APKBUILD
index eedc1fef0786..c545b2d41151 100644
--- a/testing/navi/APKBUILD
+++ b/testing/navi/APKBUILD
@@ -23,6 +23,7 @@ source="https://github.com/denisidoro/navi/archive/v$pkgver/navi-$pkgver.tar.gz
 [ $CARCH = "riscv64" ] && options="$options textrels"
 
 export NAVI_CONFIG="/etc/xdg/navi/config.yaml"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/nitrocli/APKBUILD b/testing/nitrocli/APKBUILD
index 7380dd96a2ba..becf9d431000 100644
--- a/testing/nitrocli/APKBUILD
+++ b/testing/nitrocli/APKBUILD
@@ -15,6 +15,8 @@ source="https://github.com/d-e-s-o/nitrocli/archive/v$pkgver/nitrocli-$pkgver.ta
 	src-tests-run.rs-use-python3.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	export USE_SYSTEM_LIBNITROKEY=1
 	cargo build --release --locked
diff --git a/testing/nixpacks/APKBUILD b/testing/nixpacks/APKBUILD
index 2237da4c4be5..f3942350f1a6 100644
--- a/testing/nixpacks/APKBUILD
+++ b/testing/nixpacks/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="https://github.com/railwayapp/nixpacks/archive/v$pkgver/$pkgname-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release
 }
diff --git a/testing/nsh/APKBUILD b/testing/nsh/APKBUILD
index f1c94f5acbb7..c88eb14d200e 100644
--- a/testing/nsh/APKBUILD
+++ b/testing/nsh/APKBUILD
@@ -15,6 +15,8 @@ install="$pkgname.post-install $pkgname.pre-deinstall"
 subpackages="$pkgname-dbg"
 source="https://github.com/nuta/nsh/archive/v$pkgver/nsh-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/nushell/APKBUILD b/testing/nushell/APKBUILD
index f85089c492b6..94e08fc91669 100644
--- a/testing/nushell/APKBUILD
+++ b/testing/nushell/APKBUILD
@@ -20,6 +20,8 @@ export CARGO_PROFILE_RELEASE_LTO="fat"
 # Temporarily allow textrels on riscv64
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/ouch/APKBUILD b/testing/ouch/APKBUILD
index 121922ec7e2d..5da0b878731f 100644
--- a/testing/ouch/APKBUILD
+++ b/testing/ouch/APKBUILD
@@ -10,6 +10,8 @@ license="MIT"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/ouch-org/ouch/archive/refs/tags/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/pastel/APKBUILD b/testing/pastel/APKBUILD
index a5532804df7a..bec8d77cadcd 100644
--- a/testing/pastel/APKBUILD
+++ b/testing/pastel/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 	"
 options="net" # fetch crates
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	export SHELL_COMPLETIONS_DIR="$builddir/completions"
 	cargo build --release
diff --git a/testing/pidif/APKBUILD b/testing/pidif/APKBUILD
index 145b923eb405..c9c75e25c6c1 100644
--- a/testing/pidif/APKBUILD
+++ b/testing/pidif/APKBUILD
@@ -14,6 +14,8 @@ makedepends="
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/bjesus/pidif/archive/refs/tags/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	
@@ -35,4 +37,3 @@ package() {
 sha512sums="
 ba067c8c98cc5db6c3412dd7793ba901863f9ca6fa2cf828d28597c87614c3ba7f57e74d7ba85267e28c569d30e3ab12424eae96e963092d5bfb6fd720d40ca9  pidif-0.1.tar.gz
 "
-
diff --git a/testing/pijul/APKBUILD b/testing/pijul/APKBUILD
index 62d966e1c063..72d49e8e9ea0 100644
--- a/testing/pijul/APKBUILD
+++ b/testing/pijul/APKBUILD
@@ -21,6 +21,7 @@ builddir="$srcdir/$pkgname-$_pkgver"
 options="net"
 
 export SODIUM_USE_PKG_CONFIG=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/piping-server/APKBUILD b/testing/piping-server/APKBUILD
index 3948fff59687..8aa016db9a8a 100644
--- a/testing/piping-server/APKBUILD
+++ b/testing/piping-server/APKBUILD
@@ -15,6 +15,8 @@ source="https://github.com/nwtgck/piping-server-rust/archive/v$pkgver/piping-ser
 	"
 builddir="$srcdir/piping-server-rust-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/please/APKBUILD b/testing/please/APKBUILD
index aa46dfbc95b8..9fa100c363e1 100644
--- a/testing/please/APKBUILD
+++ b/testing/please/APKBUILD
@@ -15,6 +15,8 @@ options="suid" # Required to call setuid with target uids
 builddir="$srcdir/$pkgname-v$pkgver"
 subpackages="$pkgname-doc"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/pulumi-watch/APKBUILD b/testing/pulumi-watch/APKBUILD
index 10b6bb560b0b..2c0b65f471c9 100644
--- a/testing/pulumi-watch/APKBUILD
+++ b/testing/pulumi-watch/APKBUILD
@@ -12,6 +12,8 @@ builddir="$srcdir/watchutil-rs-$pkgver"
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/pw-volume/APKBUILD b/testing/pw-volume/APKBUILD
index ac1711ee7c6d..2b373d545ffc 100644
--- a/testing/pw-volume/APKBUILD
+++ b/testing/pw-volume/APKBUILD
@@ -15,6 +15,7 @@ source="https://github.com/smasher164/pw-volume/archive/v$pkgver/pw-volume-$pkgv
 options="!check"  # no tests provided
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/py-spy/APKBUILD b/testing/py-spy/APKBUILD
index 331601c4df65..28a4eb83da04 100644
--- a/testing/py-spy/APKBUILD
+++ b/testing/py-spy/APKBUILD
@@ -17,6 +17,8 @@ subpackages="
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/benfred/py-spy/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 
diff --git a/testing/py3-mitmproxy-wireguard/APKBUILD b/testing/py3-mitmproxy-wireguard/APKBUILD
index 8d8446a16a50..9b80fbb4f827 100644
--- a/testing/py3-mitmproxy-wireguard/APKBUILD
+++ b/testing/py3-mitmproxy-wireguard/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo maturin py3-installer"
 source="https://github.com/decathorpe/mitmproxy_wireguard/archive/$pkgver/py3-mitmproxy-wireguard-$pkgver.tar.gz"
 builddir="$srcdir/mitmproxy_wireguard-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/py3-tokenizers/APKBUILD b/testing/py3-tokenizers/APKBUILD
index 6d5400bda6a0..6841848fa175 100644
--- a/testing/py3-tokenizers/APKBUILD
+++ b/testing/py3-tokenizers/APKBUILD
@@ -21,6 +21,8 @@ source="https://github.com/huggingface/tokenizers/archive/refs/tags/python-v$pkg
 builddir="$srcdir/tokenizers-python-v$pkgver/bindings/python"
 options="net !check" # requires pulling test data
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	gpep517 build-wheel \
 		--wheel-dir dist \
diff --git a/testing/rage/APKBUILD b/testing/rage/APKBUILD
index 7fbc84124998..3ebdf5ea873f 100644
--- a/testing/rage/APKBUILD
+++ b/testing/rage/APKBUILD
@@ -18,6 +18,8 @@ source="https://github.com/str4d/rage/archive/v$pkgver/rage-$pkgver.tar.gz
 	fix-build-32bit.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/rathole/APKBUILD b/testing/rathole/APKBUILD
index 2aa9f9ae0500..52c707615b5d 100644
--- a/testing/rathole/APKBUILD
+++ b/testing/rathole/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo openssl-dev"
 source="https://github.com/rapiz1/rathole/archive/v$pkgver/rathole-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/rav1e/APKBUILD b/testing/rav1e/APKBUILD
index d207bb380c17..3752521bd2db 100644
--- a/testing/rav1e/APKBUILD
+++ b/testing/rav1e/APKBUILD
@@ -21,6 +21,7 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/xiph/rav1e/archive/v$pkgver.
 
 export CARGO_PROFILE_RELEASE_INCREMENTAL=false
 export CARGO_PROFILE_RELEASE_DEBUG=false
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/rbw/APKBUILD b/testing/rbw/APKBUILD
index 7b95891294e5..6071668765b2 100644
--- a/testing/rbw/APKBUILD
+++ b/testing/rbw/APKBUILD
@@ -19,6 +19,8 @@ export CARGO_HOME="$srcdir"/cargo
 # Reduce size of the binaries.
 # 9.1M -> 4.3M
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/rdedup/APKBUILD b/testing/rdedup/APKBUILD
index 0be504e03e3a..c91e4f61c0f4 100644
--- a/testing/rdedup/APKBUILD
+++ b/testing/rdedup/APKBUILD
@@ -10,6 +10,8 @@ license="MPL-2.0"
 makedepends="cargo clang-dev libsodium-dev openssl-dev>3 xz-dev"
 source="$pkgname-$pkgver.tar.gz::https://github.com/dpc/rdedup/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/read-it-later/APKBUILD b/testing/read-it-later/APKBUILD
index bb8931efa5e0..9d2034efdb92 100755
--- a/testing/read-it-later/APKBUILD
+++ b/testing/read-it-later/APKBUILD
@@ -18,6 +18,8 @@ source="read-it-later-692cf638e1284bcf31031421e6951c767bed6139.tar.gz::https://g
 builddir="$srcdir/read-it-later-692cf638e1284bcf31031421e6951c767bed6139"
 options="!check" # no tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/testing/rezolus/APKBUILD b/testing/rezolus/APKBUILD
index 71feb9408925..09ac2d975042 100644
--- a/testing/rezolus/APKBUILD
+++ b/testing/rezolus/APKBUILD
@@ -21,6 +21,8 @@ source="https://github.com/twitter/rezolus/archive/v$pkgver/rezolus-$pkgver.tar.
 	$pkgname.logrotate
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/riemann-cli/APKBUILD b/testing/riemann-cli/APKBUILD
index bdd07d5c0c14..8b86c385c92c 100644
--- a/testing/riemann-cli/APKBUILD
+++ b/testing/riemann-cli/APKBUILD
@@ -17,6 +17,8 @@ source="https://github.com/borntyping/rust-riemann_client/archive/v$pkgver/$pkgn
 	"
 builddir="$srcdir/$_projname-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cp "$srcdir"/Cargo.lock "$builddir"/
diff --git a/testing/ripasso-cursive/APKBUILD b/testing/ripasso-cursive/APKBUILD
index 95b90c4c4c4e..50dc00f7e478 100644
--- a/testing/ripasso-cursive/APKBUILD
+++ b/testing/ripasso-cursive/APKBUILD
@@ -20,6 +20,8 @@ source="https://github.com/cortex/ripasso/archive/release-$pkgver.tar.gz"
 builddir="$srcdir/$_pkgrelname-release-$pkgver"
 options="net"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/rome/APKBUILD b/testing/rome/APKBUILD
index e2fe76674efb..255c0720c907 100644
--- a/testing/rome/APKBUILD
+++ b/testing/rome/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="https://github.com/rome/tools/archive/cli/v$pkgver/rome-$pkgver.tar.gz"
 builddir="$srcdir/tools-cli-v$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/rosenpass/APKBUILD b/testing/rosenpass/APKBUILD
index 5c2800845d45..583ccf3297e8 100644
--- a/testing/rosenpass/APKBUILD
+++ b/testing/rosenpass/APKBUILD
@@ -11,6 +11,8 @@ arch="all !armv7 !armhf !riscv64 "
 makedepends="cargo clang-dev cmake libsodium-dev linux-headers"
 source="https://github.com/rosenpass/rosenpass/archive/v$pkgver/rosenpass-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/rpg-cli/APKBUILD b/testing/rpg-cli/APKBUILD
index 410cfe060eec..679283919ebc 100644
--- a/testing/rpg-cli/APKBUILD
+++ b/testing/rpg-cli/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo"
 source="https://github.com/facundoolano/rpg-cli/archive/$pkgver/rpg-cli-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/rss-email/APKBUILD b/testing/rss-email/APKBUILD
index c2b80c94f313..b6c08a15b2af 100644
--- a/testing/rss-email/APKBUILD
+++ b/testing/rss-email/APKBUILD
@@ -16,6 +16,8 @@ source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~witcher/rss-email/archive/v$
 builddir="$srcdir/$pkgname-v$pkgver"
 options="!check" # no tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/ruff/APKBUILD b/testing/ruff/APKBUILD
index 3308ad47b96b..5ccecd08f035 100644
--- a/testing/ruff/APKBUILD
+++ b/testing/ruff/APKBUILD
@@ -17,6 +17,7 @@ subpackages="
 source="https://github.com/charliermarsh/ruff/archive/v$pkgver/ruff-$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/rust-bindgen/APKBUILD b/testing/rust-bindgen/APKBUILD
index 1a5a296a3112..401aabcc891d 100644
--- a/testing/rust-bindgen/APKBUILD
+++ b/testing/rust-bindgen/APKBUILD
@@ -14,6 +14,8 @@ options="net !check" # no test
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 source="$pkgname-$pkgver.tar.gz::https://github.com/rust-lang/rust-bindgen/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/rust-script/APKBUILD b/testing/rust-script/APKBUILD
index 2872d8ba5286..96c9604a57c8 100644
--- a/testing/rust-script/APKBUILD
+++ b/testing/rust-script/APKBUILD
@@ -16,6 +16,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/rustdesk-server/APKBUILD b/testing/rustdesk-server/APKBUILD
index 002b9047062f..d5eb3032f8aa 100644
--- a/testing/rustdesk-server/APKBUILD
+++ b/testing/rustdesk-server/APKBUILD
@@ -21,6 +21,8 @@ source="
 	hbbs.confd
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/rustic/APKBUILD b/testing/rustic/APKBUILD
index 42e197dee34f..74bdb147ccf9 100644
--- a/testing/rustic/APKBUILD
+++ b/testing/rustic/APKBUILD
@@ -17,6 +17,8 @@ subpackages="
 	"
 source="https://github.com/rustic-rs/rustic/archive/v$pkgver/rustic-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/rustscan/APKBUILD b/testing/rustscan/APKBUILD
index 7be74f358292..ccab5f17a229 100644
--- a/testing/rustscan/APKBUILD
+++ b/testing/rustscan/APKBUILD
@@ -17,6 +17,8 @@ source="https://github.com/RustScan/RustScan/archive/$pkgver/rustscan-$pkgver.ta
 options="net"
 builddir="$srcdir/RustScan-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/scryer-prolog/APKBUILD b/testing/scryer-prolog/APKBUILD
index 0eaf81bcd217..4552ea905a61 100644
--- a/testing/scryer-prolog/APKBUILD
+++ b/testing/scryer-prolog/APKBUILD
@@ -27,7 +27,7 @@ export OPENSSL_NO_VENDOR=1
 export CARGO_FEATURE_USE_SYSTEM_LIBS=1
 export SODIUM_USE_PKG_CONFIG=1
 
-# optimise size
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/sd/APKBUILD b/testing/sd/APKBUILD
index 7fe99fb05d63..6f278226a380 100644
--- a/testing/sd/APKBUILD
+++ b/testing/sd/APKBUILD
@@ -17,6 +17,7 @@ subpackages="$pkgname-doc
 	"
 
 export CARGO_HOME="$srcdir"/cargo
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 build() {
 	cargo build \
diff --git a/testing/sequoia-chameleon-gnupg/APKBUILD b/testing/sequoia-chameleon-gnupg/APKBUILD
index d0b7b13eddbc..ea9382f7f5b4 100644
--- a/testing/sequoia-chameleon-gnupg/APKBUILD
+++ b/testing/sequoia-chameleon-gnupg/APKBUILD
@@ -18,6 +18,8 @@ source="https://gitlab.com/sequoia-pgp/sequoia-chameleon-gnupg/-/archive/v$pkgve
 builddir="$srcdir/$pkgname-v$pkgver"
 options="!check" # bunch of failures against gpg cli
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/sequoia-sqv/APKBUILD b/testing/sequoia-sqv/APKBUILD
index 4547d8150138..ba158c165428 100644
--- a/testing/sequoia-sqv/APKBUILD
+++ b/testing/sequoia-sqv/APKBUILD
@@ -21,6 +21,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/shotman/APKBUILD b/testing/shotman/APKBUILD
index 45ea852c02f3..22467794e343 100644
--- a/testing/shotman/APKBUILD
+++ b/testing/shotman/APKBUILD
@@ -25,6 +25,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/signal-desktop/APKBUILD b/testing/signal-desktop/APKBUILD
index 382090aedc57..e11dc707be07 100644
--- a/testing/signal-desktop/APKBUILD
+++ b/testing/signal-desktop/APKBUILD
@@ -104,6 +104,7 @@ export CPPFLAGS="$CPPFLAGS -D__DATE__=  -D__TIME__=  -D__TIMESTAMP__="
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL=2
 export CARGO_PROFILE_RELEASE_STRIP="symbols"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 export RUSTFLAGS="$RUSTFLAGS -C linker=clang -C link-arg=-fuse-ld=lld"
 
 export YARN_CACHE_FOLDER="$srcdir/.yarn"
diff --git a/testing/so/APKBUILD b/testing/so/APKBUILD
index 788cfc56ee1a..893dbf8574e0 100644
--- a/testing/so/APKBUILD
+++ b/testing/so/APKBUILD
@@ -11,6 +11,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/samtay/so/archive/refs/tags/
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/solanum/APKBUILD b/testing/solanum/APKBUILD
index f483c1578e64..731e2e68677e 100644
--- a/testing/solanum/APKBUILD
+++ b/testing/solanum/APKBUILD
@@ -30,6 +30,8 @@ source="
 	"
 builddir="$srcdir/Solanum-$_gitrev"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile ${JOBS:+-j ${JOBS}} -C output
diff --git a/testing/spotify-player/APKBUILD b/testing/spotify-player/APKBUILD
index 3a0005286b6f..1ccc61e722a9 100644
--- a/testing/spotify-player/APKBUILD
+++ b/testing/spotify-player/APKBUILD
@@ -16,6 +16,8 @@ makedepends="
 	"
 source="$pkgname-$pkgver.tar.gz::https://github.com/aome510/spotify-player/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/spotify-tui/APKBUILD b/testing/spotify-tui/APKBUILD
index db3ded847186..69091d8587ae 100644
--- a/testing/spotify-tui/APKBUILD
+++ b/testing/spotify-tui/APKBUILD
@@ -12,6 +12,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/Rigellute/spotify-tui/archiv
 	openssl3.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/spotifyd/APKBUILD b/testing/spotifyd/APKBUILD
index 40014e3513ba..58bfb5f5c7ae 100644
--- a/testing/spotifyd/APKBUILD
+++ b/testing/spotifyd/APKBUILD
@@ -25,6 +25,8 @@ source="https://github.com/Spotifyd/spotifyd/archive/v$pkgver/spotifyd-$pkgver.t
 	spotifyd.conf
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/svgbob/APKBUILD b/testing/svgbob/APKBUILD
index 464eac9b0d79..40f1119da9bd 100644
--- a/testing/svgbob/APKBUILD
+++ b/testing/svgbob/APKBUILD
@@ -10,6 +10,8 @@ license="Apache-2.0"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/ivanceras/svgbob/archive/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/swayhide/APKBUILD b/testing/swayhide/APKBUILD
index b2dbf4dace20..358e433aa6e2 100644
--- a/testing/swayhide/APKBUILD
+++ b/testing/swayhide/APKBUILD
@@ -10,6 +10,8 @@ license="GPL-3.0-only"
 makedepends="cargo"
 source="https://github.com/NomisIV/swayhide/archive/v$pkgver/swayhide-v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/swc/APKBUILD b/testing/swc/APKBUILD
index 71ba20b79b4a..b6d51d040ba4 100644
--- a/testing/swc/APKBUILD
+++ b/testing/swc/APKBUILD
@@ -13,6 +13,8 @@ source="https://github.com/swc-project/swc/archive/v$pkgver/$pkgname-$pkgver.tar
 builddir="$srcdir/$pkgname-$pkgver/bindings"
 options="!check"  # TODO: run tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/swhkd/APKBUILD b/testing/swhkd/APKBUILD
index 19097caa2525..da32074595b1 100644
--- a/testing/swhkd/APKBUILD
+++ b/testing/swhkd/APKBUILD
@@ -21,6 +21,8 @@ riscv64)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/swww/APKBUILD b/testing/swww/APKBUILD
index a9a5b6a21261..6830795b2308 100644
--- a/testing/swww/APKBUILD
+++ b/testing/swww/APKBUILD
@@ -16,6 +16,8 @@ subpackages="
 source="$pkgname-$pkgver.tar.gz::https://github.com/Horus645/swww/archive/refs/tags/v$pkgver.tar.gz"
 options="!check" # Requires the binary to be available in PATH
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/synapse-bt/APKBUILD b/testing/synapse-bt/APKBUILD
index 51d35b622703..5c125ff214b9 100644
--- a/testing/synapse-bt/APKBUILD
+++ b/testing/synapse-bt/APKBUILD
@@ -18,6 +18,8 @@ source="synapse-bt-$pkgver.tar.gz::https://github.com/Luminarys/synapse/archive/
 	"
 builddir="$srcdir"/synapse-$pkgver
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --all --locked
 }
diff --git a/testing/systeroid/APKBUILD b/testing/systeroid/APKBUILD
index 617f63f093c8..4408faedaef1 100644
--- a/testing/systeroid/APKBUILD
+++ b/testing/systeroid/APKBUILD
@@ -19,6 +19,8 @@ case $CARCH in
 	armhf|ppc64le) options="!check" ;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/tauri-cli/APKBUILD b/testing/tauri-cli/APKBUILD
index a724af7588b4..b7a78004ac4e 100644
--- a/testing/tauri-cli/APKBUILD
+++ b/testing/tauri-cli/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/tauri-apps/tauri/releases/download/cli.rs-v$pkgver/cli.rs-$pkgver.crate"
 options="net !check" # no tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/tealdeer/APKBUILD b/testing/tealdeer/APKBUILD
index b01ede2f8998..22a7fb2a8308 100644
--- a/testing/tealdeer/APKBUILD
+++ b/testing/tealdeer/APKBUILD
@@ -19,6 +19,8 @@ source="
 
 [ "$CARCH" = "riscv64" ] && options="$options textrels"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/teapot-tools/APKBUILD b/testing/teapot-tools/APKBUILD
index d1ce9fcee2e5..2c47bfc4848a 100644
--- a/testing/teapot-tools/APKBUILD
+++ b/testing/teapot-tools/APKBUILD
@@ -20,6 +20,8 @@ makedepends="
 source="teapot_tools-$pkgver.tar.gz::https://codeberg.org/selfisekai/teapot_tools/archive/v$pkgver.tar.gz"
 builddir="$srcdir/teapot_tools"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/texlab/APKBUILD b/testing/texlab/APKBUILD
index 70372536eac7..c5af3b3233a0 100644
--- a/testing/texlab/APKBUILD
+++ b/testing/texlab/APKBUILD
@@ -19,6 +19,7 @@ case "$CARCH" in
 esac
 
 export CARGO_PROFILE_RELEASE_PANIC="unwind"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/topgrade/APKBUILD b/testing/topgrade/APKBUILD
index 30877aad9edf..46adc103bfed 100644
--- a/testing/topgrade/APKBUILD
+++ b/testing/topgrade/APKBUILD
@@ -17,6 +17,8 @@ subpackages="
 	"
 source="topgrade-$pkgver.tar.gz::https://github.com/topgrade-rs/topgrade/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/twiggy/APKBUILD b/testing/twiggy/APKBUILD
index 9e11ae9cc181..447d2ef6a936 100644
--- a/testing/twiggy/APKBUILD
+++ b/testing/twiggy/APKBUILD
@@ -10,6 +10,8 @@ license="Apache-2.0"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/rustwasm/twiggy/archive/$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/udpt/APKBUILD b/testing/udpt/APKBUILD
index 217c60a296a9..f9ce0ecbcde9 100644
--- a/testing/udpt/APKBUILD
+++ b/testing/udpt/APKBUILD
@@ -19,6 +19,8 @@ source="https://github.com/naim94a/udpt/archive/udpt-$pkgver/udpt-$pkgver.tar.gz
 	"
 builddir="$srcdir/udpt-udpt-$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/uutils-coreutils/APKBUILD b/testing/uutils-coreutils/APKBUILD
index 4ab535d25958..0feae744414a 100644
--- a/testing/uutils-coreutils/APKBUILD
+++ b/testing/uutils-coreutils/APKBUILD
@@ -25,6 +25,8 @@ armhf)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/vaultwarden/APKBUILD b/testing/vaultwarden/APKBUILD
index e9efe677732f..090762da7590 100644
--- a/testing/vaultwarden/APKBUILD
+++ b/testing/vaultwarden/APKBUILD
@@ -27,6 +27,8 @@ source="$pkgname-$pkgver.tar.gz::https://github.com/dani-garcia/vaultwarden/arch
 	$pkgname.initd
 	$pkgname.confd"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/verco/APKBUILD b/testing/verco/APKBUILD
index 9bb1af76d9ac..1a9d3900fc17 100644
--- a/testing/verco/APKBUILD
+++ b/testing/verco/APKBUILD
@@ -11,6 +11,8 @@ makedepends="cargo"
 options="!check" # No tests
 source="$pkgname-$pkgver.tar.gz::https://github.com/vamolessa/verco/archive/refs/tags/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/video-trimmer/APKBUILD b/testing/video-trimmer/APKBUILD
index e8f65b642287..36a0fa415289 100644
--- a/testing/video-trimmer/APKBUILD
+++ b/testing/video-trimmer/APKBUILD
@@ -21,6 +21,8 @@ subpackages="$pkgname-lang"
 source="https://gitlab.gnome.org/YaLTeR/video-trimmer/-/archive/v$pkgver/video-trimmer-v$pkgver.tar.gz"
 builddir="$srcdir/$pkgname-v$pkgver"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	abuild-meson . output
 	meson compile -C output
diff --git a/testing/vivid/APKBUILD b/testing/vivid/APKBUILD
index 200966dfa24a..4ad134173960 100644
--- a/testing/vivid/APKBUILD
+++ b/testing/vivid/APKBUILD
@@ -10,6 +10,7 @@ makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/sharkdp/vivid/archive/refs/tags/v$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/vocage/APKBUILD b/testing/vocage/APKBUILD
index 84e886a17044..76861be113ac 100644
--- a/testing/vocage/APKBUILD
+++ b/testing/vocage/APKBUILD
@@ -10,6 +10,8 @@ makedepends="rust cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/proycon/vocage/archive/refs/tags/v$pkgver.tar.gz"
 options="!check" # No test suite / unit tests
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
diff --git a/testing/wasmtime/APKBUILD b/testing/wasmtime/APKBUILD
index 1c0742fee257..b63132b51092 100644
--- a/testing/wasmtime/APKBUILD
+++ b/testing/wasmtime/APKBUILD
@@ -19,6 +19,8 @@ options="!check net"
 # net: fetch dependencies
 # check: custom_limiter_detect_os_oom_failure fails with oom for some reason
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/watchexec/APKBUILD b/testing/watchexec/APKBUILD
index fb4ff5e5f2d8..8374518e1667 100644
--- a/testing/watchexec/APKBUILD
+++ b/testing/watchexec/APKBUILD
@@ -26,6 +26,8 @@ arm*|aarch64|ppc64le)
 	;;
 esac
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 	cargo fetch --target="$CTARGET" --locked
diff --git a/testing/waylevel/APKBUILD b/testing/waylevel/APKBUILD
index a097233d4380..f3cafbd3aa0d 100644
--- a/testing/waylevel/APKBUILD
+++ b/testing/waylevel/APKBUILD
@@ -17,6 +17,7 @@ makedepends="
 source="$pkgname-$pkgver.tar.gz::https://git.sr.ht/~shinyzenith/waylevel/archive/$pkgver.tar.gz"
 
 export CARGO_PROFILE_RELEASE_OPT_LEVEL="z"
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/weggli/APKBUILD b/testing/weggli/APKBUILD
index 33ba9d17ddcd..b39af8bd0c4e 100644
--- a/testing/weggli/APKBUILD
+++ b/testing/weggli/APKBUILD
@@ -10,6 +10,8 @@ arch="all !s390x !riscv64" # blocked by rust/cargo
 makedepends="cargo"
 source="https://github.com/googleprojectzero/weggli/archive/v$pkgver/weggli-$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/wk-adblock/APKBUILD b/testing/wk-adblock/APKBUILD
index 7b9fe9d1c4be..681cf43826b7 100644
--- a/testing/wk-adblock/APKBUILD
+++ b/testing/wk-adblock/APKBUILD
@@ -18,6 +18,7 @@ builddir="$srcdir/webextension-adblocker-$_commit"
 
 # optimise size
 export CARGO_FEATURE_USE_SYSTEM_LIBS=1
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
 
 prepare() {
 	default_prepare
diff --git a/testing/wpaperd/APKBUILD b/testing/wpaperd/APKBUILD
index c4cf34625b97..87f6e8d63931 100644
--- a/testing/wpaperd/APKBUILD
+++ b/testing/wpaperd/APKBUILD
@@ -17,6 +17,8 @@ subpackages="
 source="https://github.com/danyspin97/wpaperd/archive/$pkgver/wpaperd-$pkgver.tar.gz"
 options="!check" # no test suite
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/xplr/APKBUILD b/testing/xplr/APKBUILD
index 8df7114a8d5f..4fcc7909c775 100644
--- a/testing/xplr/APKBUILD
+++ b/testing/xplr/APKBUILD
@@ -14,6 +14,8 @@ source="
 	remove-vendored-lua.patch
 	"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/youki/APKBUILD b/testing/youki/APKBUILD
index c1430f0fbf45..fec31ed8737f 100644
--- a/testing/youki/APKBUILD
+++ b/testing/youki/APKBUILD
@@ -26,6 +26,8 @@ options="!check"  # FIXME: some tests fail
 # Disable systemd_cgroups
 _cargo_opts='--frozen --no-default-features --features=libcgroups/v1,libcgroups/v2'
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 prepare() {
 	default_prepare
 
diff --git a/testing/zkgroup/APKBUILD b/testing/zkgroup/APKBUILD
index 632eea57955a..b6063120aaae 100644
--- a/testing/zkgroup/APKBUILD
+++ b/testing/zkgroup/APKBUILD
@@ -10,6 +10,8 @@ license="GPL-3.0-only"
 makedepends="cargo"
 source="$pkgname-$pkgver.tar.gz::https://github.com/signalapp/zkgroup/archive/v$pkgver.tar.gz"
 
+export CARGO_REGISTRIES_CRATES_IO_PROTOCOL="sparse"
+
 build() {
 	cargo build --release --locked
 }
-- 
GitLab