Skip to content

Setting up the system

Developing decentralized applications on top of Shardus usually requires a set of these packages in the Shardus SDK described here. Before going ahead with development, developers may need to configure their system as follows.

  • Node.js (16.11.1)
  • npm (8.0.0)
  • Python3.9 (or latest)
  • Rust

Configuring Node version

It is generally recommended to use nvm (Node Version Manager) to anyone serious about Node.js development. Otherwise, developers may need to install a specific Node version manually.

The nvm tool allows you to quickly switch between different Node versions.

Install nvm here.

After installing nvm on your machine, you are then able to switch to the specific Node version by entering

nvm install 16.11.1


nvm use 16.11.1

Configuring Python 3

Installing Python on a Unix machine is fairly straightforward.

This step is optional if your machine has Python 3 already configured

For example, to install Python 3 on Arch Linux:

sudo pacman -Sy python3.9

On Ubuntu:

sudo apt-get install python3.9

The exact command differs from one Linux system to another depending on what package management tools are being installed on the machine.

For Windows users, this would include downloading Python binaries for Windows and installing it. This is also necessary for Mac systems.

It is a known issue that node-gyp would cause problems without the latest Python version configured.

If you have multiple Python versions on your machine and need to point npm to a specific Python version, run this command:

npm config set python /path/to/python3.9

Configuring Rust

This step is optional if your machine has the Rust toolchain already configured

Currently, npm compiles the Rust libraries on the fly when installing Shardus core. In the future, you would not need to install Rust, as the binaries will be included instead.

Until then, install Rust by following the instructions here. Once rustup is set up on your machine, enter:

rustup install stable
rustup default stable

For other systems see this.