Dependency Installation

StreamingFast Substreams dependency installation

Dependencies Overview

Working with Substreams requires a number of different applications and tools. A full list is provided on the Substreams prerequisites page.
Instructions and links are provided below to assist with the installation of the required dependencies for Substreams.
Tip: Instructions are provided below for cloud-based Gitpod setups.

Local installation

substreams CLI Installation

The CLI is required and is the primary user interface for working with Substreams.
Tip: Full setup instructions are available on the installing the Substreams CLI page_._

Rust Installation

Developing Substreams modules requires a working Rust compilation environment.
There are several ways to install Rust. Using curl from the terminal is the quickest and easiest.
curl --proto '=https' --tlsv1.2 -sSf | sh
source $HOME/.cargo/env # to configure your current shell

Buf Installation

Buf simplifies the generation of typed structures in any language. Buf works with remote builder executed on Buf server, so an internet connection is required when generating Rust bindings from Protobuf definitions.
Visit the Buf website for additional information and installation instructions.
Note: Substreams packages are compatible with Buf images.

Cloud-based environment with Gitpod

Follow the steps below to use Gitpod with Substreams.
  1. 2.
    Obtain a StreamingFast authentication key from:
  2. 3.
    Create a Gitpod account.
  3. 4.
    Configure a STREAMINGFAST_KEY variable in the Gitpod account settings.
  4. 5.
    Open the repository as a Gitpod workspace.
  5. 6.
    The Substreams Template includes a Makefile simplifying the installation process.
    1. 1.
      Running make build rebuilds the Substreams implementation. This should be done after making changes to the code.
    2. 2.
      make stream runs the stream for a few blocks. Edit Makefile to change the invocation as changes are made to the Substreams implementation.