Build
Getting Started
Installation

Installation

Compile and install

Ubuntu

Install dependencies

sudo apt install git curl gcc lld pkg-config libssl-dev libclang-dev libsqlite3-dev g++

Install Rust

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh

Clone source code

git clone https://github.com/rooch-network/rooch.git

Compile and install Rooch

cd rooch && cargo build && cp target/debug/rooch ~/.cargo/bin/

Windows

Installing Dependencies

To compile Rooch on Windows, you'll need to install the following dependencies:

  1. Build Tools for Visual Studio 2022 (opens in a new tab)
  2. LLVM (opens in a new tab)
  3. Git (opens in a new tab)

Make sure to install these dependencies and set up the necessary environment variables.

Installing Rust

Download the Rust toolchain by clicking here (opens in a new tab).

Cloning the Source Code

Use the following command to clone the Rooch source code repository:

git clone https://github.com/rooch-network/rooch.git

Compiling and Installing Rooch

Navigate to the Rooch project directory:

cd rooch

Build Rooch using the following command:

cargo build

Finally, copy the compiled Rooch binary to your Cargo bin directory:

cp target/debug/rooch.exe ~/.cargo/bin/

macOS

Firstly, create a binary file directory

mkdir ~/.local/bin/ 

Secondly, add the binary file directory path into ~/.zschrc

export PATH="$PATH:$HOME/.local/bin"

Thirdly, download the binary file rooch-macos-latest.zip from github release page (opens in a new tab), unzip the file and move the binary file into ~/.local/bin/

Fourthly, open a new terminal window and run rooch to check if it works

Binary install

Linux

Download

wget https://github.com/rooch-network/rooch/releases/download/v0.1/rooch-ubuntu-latest.zip

Decompress

unzip rooch-ubuntu-latest.zip

Install

sudo cp rooch /usr/local/bin