Building from Source

Install Rust

Install the latest version of Rust.

curl https://sh.rustup.rs -sSf | sh -s -- -y

If Rust is already installed, make sure to add the nightly version and the WebAssembly target:

# Ensure the current shell has cargo
source ~/.cargo/env

# Update the Rust toolchain
rustup default stable
rustup update

# Add the nightly and WebAssembly targets:
rustup update nightly-2023-04-16
rustup target add wasm32-unknown-unknown --toolchain nightly-2023-04-16

Verify your installation.

rustup show

Install dependencies

Make sure you have all the necessary dependencies for compiling and running the Creditcoin node software.

sudo apt install make clang pkg-config libssl-dev build-essential protobuf-compiler

You may need to install & configure Network Time Protocol (NTP) Client.

Building & Installing the Creditcoin binary

You will be building the latest creditcoin binary from gluwa/creditcoin repository on Github using the source code in the main branch.

Download the repository by cloning it.

git clone https://github.com/gluwa/creditcoin

Move into the creditcoin folder and checkout to the main branch by running the following command.

cd creditcoin git checkout main

Build the binary with cargo.

cargo build -r

This step might take 10 - 40 minutes to finish.

Sync Chain Data

Synchronize your node by running the binary inside the target/release folder.

Last updated