build: use domestic Rust mirror on JD node

This commit is contained in:
冰朔 2026-07-17 19:16:40 +08:00
parent 1ec9563842
commit 11e5ac0fb2

View File

@ -22,6 +22,8 @@ command -v node >/dev/null || { echo "Node.js is required." >&2; exit 2; }
if ! command -v cargo >/dev/null 2>&1; then if ! command -v cargo >/dev/null 2>&1; then
command -v curl >/dev/null || { echo "curl is required to install Rust." >&2; exit 2; } command -v curl >/dev/null || { echo "curl is required to install Rust." >&2; exit 2; }
export RUSTUP_DIST_SERVER="${RUSTUP_DIST_SERVER:-https://rsproxy.cn}"
export RUSTUP_UPDATE_ROOT="${RUSTUP_UPDATE_ROOT:-https://rsproxy.cn/rustup}"
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
fi fi
export PATH="$HOME/.cargo/bin:$PATH" export PATH="$HOME/.cargo/bin:$PATH"