abinfo "FIXME: Create dummy Rustup to fix cargokit"
cat > /usr/local/bin/rustup << 'EOF'
arch=$(uname -m)
if [ "$1" = "run" ]; then
    shift 2
    "$@"
    exit $?
fi
if [ "$*" = "toolchain list" ]; then
    echo "stable-$arch-unknown-linux-gnu (active, default)"
elif [ "$*" = "target list --toolchain stable-$arch-unknown-linux-gnu --installed" ]; then
    echo "$arch-unknown-linux-gnu"
else
    echo "$* Not supported"
    exit 1
fi
EOF
chmod +x /usr/local/bin/rustup

abinfo "Mapping Flutter architecture ..."
if ab_match_arch amd64; then
    export ARCH="x64"
elif ab_match_arch arm64; then
    export ARCH="arm64"
fi
