#!/bin/bash set -e BLUE='\033[1;34m' YELLOW='\033[1;33m' GREEN='\033[1;32m' NC='\033[0m' echo -e "${BLUE} LOG:${YELLOW} Setting up Rust (Rustup)...${NC}" # 1. Install Rustup if ! command -v rustup &> /dev/null; then curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y fi # 2. Source Environment [ -f "$HOME/.cargo/env" ] && source "$HOME/.cargo/env" # 3. Update to Stable if command -v cargo &> /dev/null; then rustup default stable rustup update echo -e "${GREEN} LOG: Rust setup complete.$(cargo --version)${NC}" fi