-
Notifications
You must be signed in to change notification settings - Fork 4
/
setup.sh
executable file
·36 lines (27 loc) · 1.12 KB
/
setup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
# Update package lists
echo "Updating package lists..."
sudo apt-get update
# Install required dependencies
echo "Installing required dependencies..."
sudo apt install --assume-yes build-essential clang curl libssl-dev protobuf-compiler
# Install Rust using rustup
echo "Installing Rust using rustup..."
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
# Source the cargo environment script to set up environment variables
echo "Sourcing the cargo environment script..."
source $HOME/.cargo/env
# Set default Rust version to stable
echo "Setting default Rust version to stable..."
rustup default stable
# Install specific nightly version
echo "Installing specific nightly version..."
rustup install nightly-2023-12-21
# Add WebAssembly target for nightly version (pallet-contracts compatible)
echo "Adding WebAssembly target for nightly version..."
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-12-21
# Set nightly version as override
echo "Setting nightly version as override..."
rustup override set nightly-2023-12-21
# Restart bash for changes to take effect
exec bash