Thanks for your interest in contributing to Fuel Indexer! This document outlines some the conventions on building, running, and testing Fuel Indexer.
Fuel Indexer has many dependent repositories. If you need any help or mentoring getting started, understanding the codebase, or anything else, please ask on our Discord .
Future instructions assume you are in this repository
git clone https://github.com/FuelLabs/fuel-indexer
cd fuel-indexer
rustup
is the official toolchain manager for Rust.
We use some additional components such as clippy
and rustfmt
, to install those:
rustup component add clippy
rustup component add rustfmt
Fuel Indexer also uses a few other tools installed via cargo
cargo install sqlx-cli
cargo install wasm-snip
Fuel Indexer's two primary crates are fuel-indexer
and fuel-indexer-api-server
.
You can build Fuel Indexer:
cargo build -p fuel-indexer -p fuel-indexer-api-server --release --locked
Linting is done using rustfmt and clippy, which are each separate commands:
cargo fmt --all --check
cargo clippy --all-features --all-targets -- -D warnings
The test suite follows the Rust cargo standards.
Testing is simply done using Cargo:
RUSTFLAGS='-D warnings' SQLX_OFFLINE=1 cargo test --locked --all-targets --all-features
This is a rough outline of what a contributor's workflow looks like:
develop
1234/short-description
, where 1234
is the number of the associated issue. [commit type]: [short commit blurb]
fix: database locking issue
enhancement: i added something super cool
chore: i did somthing not fun
bug
: If fixing broken functionality enhancement
: If adding new functionality chore
: If finishing valuable work (that's no fun!) testing
: If only updating/writing tests docs
: If just updating docs feat
: If adding a non-trivial new feature Thanks for your contributions!
For beginners, we have prepared many suitable tasks for you. Checkout our Good First Issues for a list.
If you are planning something that relates to multiple components or changes current behaviors, make sure to open an issue to discuss with us before continuing.
Was this page helpful?