Thanks for your interest in contributing! This guide covers everything you need to go from zero to a merged PR.
| Tool | Version | Install |
|---|---|---|
| Rust | stable (see rust-toolchain.toml) |
https://rustup.rs |
| wasm32 target | — | rustup target add wasm32-unknown-unknown |
| Soroban CLI | latest | cargo install --locked soroban-cli |
Verify your setup:
rustc --version
cargo --version
soroban --version
rustup target list --installed | grep wasm32# 1. Fork and clone
git clone https://github.com/<your-username>/TrustLink.git
cd TrustLink
# 2. Install the wasm target (rust-toolchain.toml handles the Rust version)
rustup target add wasm32-unknown-unknown
# 3. Confirm the project compiles
cargo check# Run all unit and integration tests
cargo test
# Or via make
make testAll tests must pass before submitting a PR.
# Debug build
make build
# Optimized release build (requires soroban-cli)
make optimizeThis project enforces formatting and lint rules in CI.
# Format code (must be clean before committing)
make fmt # or: cargo fmt
# Run linter — zero warnings allowed
make clippy # or: cargo clippy --all-targets -- -D warningsRun both before every commit.
-
Branch off
mainwith a descriptive name:git checkout -b feat/your-feature # or git checkout -b fix/your-bugfix -
Commit with clear messages following the format:
<type>: short description Optional longer explanation.Common types:
feat,fix,docs,test,refactor. -
Before pushing, make sure:
-
cargo testpasses -
cargo fmt -- --checkis clean -
cargo clippy --all-targets -- -D warningsis clean
-
-
Open a PR against
main. Include:- What the change does and why
- Any relevant issue numbers (
Closes #123) - Notes for reviewers if the change is non-obvious
-
Review: at least one approval is required before merging. Address all review comments; force-push to the same branch to update the PR.
Open a GitHub issue with:
- A clear description of the problem or feature request
- Steps to reproduce (for bugs)
- Expected vs actual behaviour