File tree Expand file tree Collapse file tree 3 files changed +42
-32
lines changed
Expand file tree Collapse file tree 3 files changed +42
-32
lines changed File renamed without changes.
Original file line number Diff line number Diff line change 1+ #! /bin/sh
2+
3+ echo " *** Checking if Rust is already installed"
4+
5+ if which rustup > /dev/null 2>&1 ; then
6+ echo " Rust is already installed. Exiting."
7+ exit 0
8+ fi
9+
10+ echo " *** Installing Rust"
11+
12+ if [[ " $( uname) " == " Darwin" ]]; then
13+ # macOS
14+ if ! which brew > /dev/null 2>&1 ; then
15+ /bin/bash -c " $( curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh) "
16+ fi
17+
18+ brew update
19+ brew install openssl cmake llvm
20+ elif [[ " $( uname) " == " Linux" ]]; then
21+ if [[ -f " /etc/arch-release" ]]; then
22+ # Arch Linux
23+ sudo pacman -Syu --noconfirm
24+ sudo pacman -S --noconfirm cmake pkgconf openssl git gcc clang
25+ else
26+ # Ubuntu (and other Debian-based distributions)
27+ sudo apt-get update
28+ sudo apt-get install -y cmake pkg-config libssl-dev git gcc build-essential clang libclang-dev
29+ fi
30+ else
31+ echo " Unsupported operating system. Exiting."
32+ exit 1
33+ fi
34+
35+ curl https://sh.rustup.rs -sSf | sh -s -- -y
36+ source " $HOME /.cargo/env"
37+ rustup default stable
38+
39+ rustup update nightly
40+ rustup target add wasm32-unknown-unknown --toolchain nightly
41+
42+ echo " *** Rust installation complete"
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments