This guide covers some of the basics with regard to installing dependencies for the Fuel indexer service. However, note that this guide is meant to be a general overview for most platforms and by no means covers all platforms.
If you're having trouble with dependencies on your system, we recommend that you use
To run the Fuel indexer, you'll need to install a few dependencies on your system:
wasm-snip, a utility for stripping symbols from WebAssemly binaries.
If you don't want to install a database directly onto your system, you can use Docker to run a database in an isolated container. You can install Docker by following its installation instructions .
For reference purposes, we provide a
docker composefile that comes with a PostgresSQL server and a Fuel indexer service.
Please visit the Fuel installation guide to install the Fuel toolchain, which includes binaries for the Fuel indexer.
The Fuel indexer requires the use of a database. We currently support PostgresSQL .
IMPORTANT: Fuel Indexer users on most platforms don't need to explicitly install PostgresQL software via a package manager. When starting the indexer service via
forc index startsimply pass the
--embedded-databaseflag in order to have the indexer service download and start an embedded PostgresQL instance via
forc index postgres.
However note that this
--embedded-databasefunctionality can be a bit brittle or flaky on some platforms, so alternative methods of installing or using PostgresQL are briefly mentioned below.
On macOS systems, you can install PostgreSQL through Homebrew. If it isn't present on your system, you can install it according to the instructions .
Once installed, you can add PostgreSQL to your system by running
brew install postgresql.
Two additional cargo components will be required to build your indexers:
wasm-snip and the
As of this writing, there is a small bug in newly built Fuel indexer WASM modules that produces a WASM runtime error due an errant upstream dependency. For now, you can use
wasm-snipto remove the errant symbols from the WASM module, and prevent this issue from happening. An example can be found in the related script here .
Note that since
wasm-snipstrips Web Assembly related symbols, users will temporarily not be allowed to include other WASM-friendly crates (e.g.,
chrono) in their indexers.
To install the
cargo install wasm-snip
To install the
wasm32-unknown-unknown target via
rustup target add wasm32-unknown-unknown
IMPORTANT: Users on Apple Silicon macOS systems may experience trouble when trying to build WASM modules due to its
clangbinary not supporting WASM targets. If encountered, you can install a binary with better support from Homebrew (
brew install llvm) and instruct
rustcto leverage it by setting the following environment variables:
Addtionally, on some systems you need to explictly link clang to llvm.