From e126a50decd43f9217749d3c5339c9202314c6c3 Mon Sep 17 00:00:00 2001 From: Hannes Moser Date: Mon, 10 Oct 2022 15:23:51 +0200 Subject: [PATCH] fix issues with cargo memory consumption in qemu environments --- docker/setup/rustup.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docker/setup/rustup.sh b/docker/setup/rustup.sh index 84df40b9..43bb3589 100755 --- a/docker/setup/rustup.sh +++ b/docker/setup/rustup.sh @@ -22,6 +22,9 @@ main() { rustup target add "$RUST_TARGET" chmod -R a+w "$RUSTUP_HOME" "$CARGO_HOME" + # Use git CLI to fetch crates (avoid memory issues in QEMU environments) + printf "[net]\ngit-fetch-with-cli = true" >> "$CARGO_HOME/config.toml" + # Pre-fetch the registry index cargo init --name tmp . cargo fetch