Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: replace localnet_setup with rust installation #327

Merged
merged 5 commits into from
Apr 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions scripts/install_rust.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
#!/bin/sh

echo "*** Checking if Rust is already installed"

if which rustup >/dev/null 2>&1; then
echo "Rust is already installed. Exiting."
exit 0
fi

echo "*** Installing Rust"

if [[ "$(uname)" == "Darwin" ]]; then
# macOS
if ! which brew >/dev/null 2>&1; then
/bin/bash -c "$(curl -fsSL https://github.com/raw/Homebrew/install/master/install.sh)"
fi

brew update
brew install openssl cmake llvm
elif [[ "$(uname)" == "Linux" ]]; then
if [[ -f "/etc/arch-release" ]]; then
# Arch Linux
sudo pacman -Syu --noconfirm
sudo pacman -S --noconfirm cmake pkgconf openssl git gcc clang
else
# Ubuntu (and other Debian-based distributions)
sudo apt-get update
sudo apt-get install -y cmake pkg-config libssl-dev git gcc build-essential clang libclang-dev
fi
else
echo "Unsupported operating system. Exiting."
exit 1
fi

curl https://sh.rustup.rs -sSf | sh -s -- -y
source "$HOME/.cargo/env"
rustup default stable

rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightly

echo "*** Rust installation complete"
32 changes: 0 additions & 32 deletions scripts/localnet_setup.sh

This file was deleted.

Loading