Skip to content
Snippets Groups Projects
Select Git revision
  • master default protected
  • network/gdev-800 protected
  • cgeek/issue-297-cpu
  • gdev-800-tests
  • update-docker-compose-rpc-squid-names
  • fix-252
  • 1000i100-test
  • hugo/tmp-0.9.1
  • network/gdev-803 protected
  • hugo/endpoint-gossip
  • network/gdev-802 protected
  • hugo/distance-precompute
  • network/gdev-900 protected
  • tuxmain/anonymous-tx
  • debug/podman
  • hugo/195-doc
  • hugo/195-graphql-schema
  • hugo-tmp-dockerfile-cache
  • release/client-800.2 protected
  • release/runtime-800 protected
  • gdev-900-0.10.1 protected
  • gdev-900-0.10.0 protected
  • gdev-900-0.9.2 protected
  • gdev-800-0.8.0 protected
  • gdev-900-0.9.1 protected
  • gdev-900-0.9.0 protected
  • gdev-803 protected
  • gdev-802 protected
  • runtime-801 protected
  • gdev-800 protected
  • runtime-800-bis protected
  • runtime-800 protected
  • runtime-800-backup protected
  • runtime-701 protected
  • runtime-700 protected
  • runtime-600 protected
  • runtime-500 protected
  • v0.4.1 protected
  • runtime-401 protected
  • v0.4.0 protected
40 results

setup.md

Blame
    • Hugo Trentesaux's avatar
      b145f36f
      gtest genesis parsing (!176) · b145f36f
      Hugo Trentesaux authored and Hugo Trentesaux's avatar Hugo Trentesaux committed
      * fix clippy
      
      * fix after rebase
      
      * WIP example specs
      
      * fix after rebase
      
      * add reproducibility
      
      * doc add missing protobuf compiler
      
      * remove ref to genesis timestamp
      
      * fix broken next identity index genesis
      
      * our pallets are not coming from the framework
      
      * fix first_ud everywhere
      
      * remove files unwanted on main branch
      
      * also apply renaming to gdev
      
      * rename first_ud_value and add comments
      
      (to put in value the absence of first_ud_time)
      
      * use index provided in GenesisIdty
      
      * add mold to documentation
      
      * change gtest existential deposit
      
      and adapt genesis parsing to real-world data
      
      * embed raw chainspecs only when enabled
      
      * add comments
      b145f36f
      History
      gtest genesis parsing (!176)
      Hugo Trentesaux authored and Hugo Trentesaux's avatar Hugo Trentesaux committed
      * fix clippy
      
      * fix after rebase
      
      * WIP example specs
      
      * fix after rebase
      
      * add reproducibility
      
      * doc add missing protobuf compiler
      
      * remove ref to genesis timestamp
      
      * fix broken next identity index genesis
      
      * our pallets are not coming from the framework
      
      * fix first_ud everywhere
      
      * remove files unwanted on main branch
      
      * also apply renaming to gdev
      
      * rename first_ud_value and add comments
      
      (to put in value the absence of first_ud_time)
      
      * use index provided in GenesisIdty
      
      * add mold to documentation
      
      * change gtest existential deposit
      
      and adapt genesis parsing to real-world data
      
      * embed raw chainspecs only when enabled
      
      * add comments
    title: Installation

    This page will guide you through the steps needed to prepare a computer for development with the Duniter Substrate Node. Since Substrate is built with the Rust programming language, the first thing you will need to do is prepare the computer for Rust development - these steps will vary based on the computer's operating system. Once Rust is configured, you will use its toolchains to interact with Rust projects; the commands for Rust's toolchains will be the same for all supported, Unix-based operating systems.

    Unix-Based Operating Systems

    Substrate development is easiest on Unix-based operating systems like macOS or Linux. The examples in the Substrate Tutorials and Recipes use Unix-style terminals to demonstrate how to interact with Substrate from the command line.

    macOS

    Open the Terminal application and execute the following commands:

    # Install Homebrew if necessary https://brew.sh/
    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
    
    # Make sure Homebrew is up-to-date, install openssl and cmake
    brew update
    brew install openssl cmake

    Ubuntu/Debian

    Use a terminal shell to execute the following commands:

    sudo apt update
    # May prompt for location information
    sudo apt install -y cmake pkg-config libssl-dev git build-essential clang libclang-dev curl protobuf-compiler

    Arch Linux

    Run these commands from a terminal:

    pacman -Syu --needed --noconfirm cmake gcc openssl-1.0 pkgconf git clang
    export OPENSSL_LIB_DIR="/usr/lib/openssl-1.0"
    export OPENSSL_INCLUDE_DIR="/usr/include/openssl-1.0"

    Fedora/RHEL/CentOS

    Use a terminal to run the following commands:

    # Update
    sudo dnf update
    # Install packages
    sudo dnf install cmake pkgconfig rocksdb rocksdb-devel llvm git libcurl libcurl-devel curl-devel clang

    Rust Developer Environment

    This project uses rustup to help manage the Rust toolchain. First install and configure rustup:

    # Install
    curl https://sh.rustup.rs -sSf | sh
    # Configure
    source ~/.cargo/env

    Finally, configure the Rust toolchain:

    rustup default stable
    rustup update nightly
    rustup update stable
    rustup target add wasm32-unknown-unknown --toolchain nightly

    Installing mold linker to decrease build time

    Mold (modern linker) (https://github.com/rui314/mold) decreases the build time. Install it through your system package for example then add the following to your ~/.cargo/config:

    [target.x86_64-unknown-linux-gnu]
    linker = "clang"
    rustflags = ["-C", "link-arg=-fuse-ld=/usr/bin/mold"]

    (see https://forum.duniter.org/t/decrease-duniter-build-time/10170 on the forum)