Skip to content

Latest commit

 

History

History
160 lines (105 loc) · 3.75 KB

installation.md

File metadata and controls

160 lines (105 loc) · 3.75 KB

Install required packages and Rust

Install OS Specific Dependencies

Ubuntu/Debian

Use a terminal shell to execute the following commands:

sudo apt update
# May prompt for location information
sudo apt install --assume-yes git clang curl libssl-dev llvm libudev-dev make protobuf-compiler

Arch Linux

Run these commands from a terminal:

pacman -Syu --needed --noconfirm curl git clang make protobuf

Fedora

Run these commands from a terminal:

sudo dnf update
sudo dnf install clang curl git openssl-devel make protobuf-compiler

OpenSUSE

Run these commands from a terminal:

sudo zypper install clang curl git openssl-devel llvm-devel libudev-devel make protobuf

macOS

Install Homebrew

In most cases, you should use Homebrew to install and manage packages on macOS computers. If you don't already have Homebrew installed on your local computer, you should download and install it before continuing.

To install Homebrew:

  1. Open the Terminal application.

  2. Download and install Homebrew by running the following command:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  3. Verify Homebrew has been successfully installed by running the following command:

    brew --version

    The command displays output similar to the following:

    Homebrew 3.3.1
    Homebrew/homebrew-core (git revision c6c488fbc0f; last commit 2021-10-30)
    Homebrew/homebrew-cask (git revision 66bab33b26; last commit 2021-10-30)
  4. Ensure you have an updated version of Homebrew by running the following command:

    brew update

    Because the blockchain requires standard cryptography to support the generation of public/private key pairs and the validation of transaction signatures, you must also have a package that provides cryptography, such as openssl.

  5. Install the openssl package by running the following command:

    brew install openssl
  6. Install cmake using the following command:

    brew install cmake
  7. Support for Apple Silicon

    Protobuf must be installed before the build process can begin. To install it, run the following command:

    brew install protobuf

Rust toolchain

  1. Download the rustup installation program and use it to install Rust by running the following command:

    curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
  2. Follow the prompts displayed to proceed with a default installation.

  3. Update your current shell to include Cargo by running the following command:

    source $HOME/.cargo/env
  4. Verify your installation by running the following command:

    rustc --version
  5. Configure the Rust toolchain to default to the latest stable version by running the following commands:

    rustup default stable
    rustup update
  6. Add the nightly release and the nightly WebAssembly (wasm) targets to your development environment by running the following commands:

    rustup update nightly
    rustup target add wasm32-unknown-unknown --toolchain nightly
  7. Verify the configuration of your development environment by running the following command:

    rustup show
    rustup +nightly show

    The command displays output similar to the following:

    # rustup show
    
    active toolchain
    ----------------
    
    stable-x86_64-unknown-linux-gnu (default)
    rustc 1.62.1 (e092d0b6b 2022-07-16)
    
    # rustup +nightly show
    
    active toolchain
    ----------------
    
    nightly-x86_64-unknown-linux-gnu (overridden by +toolchain on the command line)
    rustc 1.65.0-nightly (34a6cae28 2022-08-09)