Linux
Setting Up a Linux Development Environment for Rust
This guide will help you set up your Linux environment for Rust development, focusing on the necessary steps to install Rust and the required dependencies for developing and validating on the Argochain network.
Prerequisites
Before you begin, ensure your system is up to date and has the necessary tools installed. This guide uses Ubuntu as an example, but the commands can be adapted for other Linux distributions.
Step 1: Update Your System
Open a terminal and update your package lists.
sudo apt updateStep 2: Install Required Packages
Install the essential packages:
sudo apt install -y build-essential clang curl git libssl-dev llvm libudev-dev python3 python3-pip make protobuf-compilerStep 3: Install Rust
Download and run the rustup installation script to install Rust:
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | shFollow the on-screen instructions to complete the installation.
Step 4: Configure Rust
To update your current shell to include Cargo (Rust's package manager), run:
source $HOME/.cargo/envVerify the Rust installation:
rustc --versionSet Rust to use the stable version by default and update to the latest version:
rustup default stable
rustup updateStep 5: Add Nightly Toolchain and WebAssembly Target
Add the nightly toolchain and the WebAssembly (wasm) target required for Substrate development:
rustup update nightly
rustup target add wasm32-unknown-unknown --toolchain nightlyVerify the configuration:
rustup show
rustup +nightly showCompile the Argochain Node
Now that Rust is installed and configured, you can compile an Argochain node.
Step 1: Clone the Argochain Repository
Clone the Argochain repository:
git clone https://github.com/devolved-ai/argochain
cd argochainStep 2: Compile the Node Template
Compile the Argochain node:
cargo build --releaseThe compilation process may take several minutes.
Last updated