Skip to content
BaseHub by wbnns Updated

Development Workflow

The base/base repository drives day-to-day development through Just recipes for checking, testing, formatting, and CI parity. The recipes below cover the commands you will run most often.

CommandWhat it does
just checkLists the individual check::* static-check recipes
just check::allRuns the full static-check suite (format, clippy, udeps, deny)
just testRuns the test suite via cargo-nextest
just fixAuto-fixes formatting, clippy, and zepter issues
just ciFull local gate (fix, checks, tests, lychee, zepter, no-std checks)
just prSame as just ci, but with tests scoped to affected crates

The project uses cargo-nextest as its test runner. Install it if you have not already:

Terminal window
cargo install cargo-nextest

Run the full test suite:

Terminal window
just test

This executes cargo nextest with all features enabled. The devnet tests are excluded by default since they require a running Docker Compose stack.

To run tests for a specific crate:

Terminal window
cargo nextest run -p base-execution-evm

To run a single test by name:

Terminal window
cargo nextest run -p base-execution-evm -- test_name

Some tests depend on compiled Solidity contracts. If you see test failures related to missing contract artifacts, build them first:

Terminal window
just build-contracts

See Building from Source for details.

The static checks live in a check module, so each one is addressed as check::<name>. Running the module on its own lists what is available:

Terminal window
just check

To run the whole static-check suite at once:

Terminal window
just check::all

That expands to these four, in order:

  1. check::format — Verifies that all Rust source files match rustfmt style.
  2. check::clippy — Runs Clippy with the project’s configured lints.
  3. check::udeps — Detects unused dependencies in Cargo.toml files.
  4. check::deny — Checks dependencies for known vulnerabilities and license issues via cargo-deny.

Note that the test suite is not part of check::all — it is a separate step, run on its own or as part of just ci. Two further checks, check::no-std and check::no-std-proof, sit outside check::all as well and are invoked directly by the CI recipes.

If any step fails, the pipeline stops. Fix the issue and re-run.

Most formatting and lint issues can be fixed automatically:

Terminal window
just fix

This runs three fixers in sequence:

  1. format-fix — Applies rustfmt to all source files.
  2. clippy-fix — Applies Clippy’s suggested fixes.
  3. zepter-fix — Fixes feature propagation issues detected by zepter.

Run just fix before committing to avoid CI failures.

To run the same gate the merge queue will ultimately enforce:

Terminal window
just ci

This encompasses:

  1. fix — auto-fix everything fixable
  2. check::all — the static-check quality gate
  3. test — the full workspace test suite
  4. lychee — checks for broken links in documentation
  5. zepter — validates Cargo feature propagation
  6. check::no-std and check::no-std-proof — ensure no_std compatibility for the crates that require it, including the bare-metal proof crates

For faster iteration there is just pr, which runs the same checks but swaps the full test suite for test-affected, limiting tests to the crates your branch changes relative to main:

Terminal window
just pr

Use just pr while iterating and just ci before requesting review. See Testing for the tiers those tests are drawn from and how each CI stage differs.

Check formatting without modifying files:

Terminal window
just check::format

Auto-format all files:

Terminal window
just format-fix

The project uses the standard rustfmt configuration. If your editor supports format-on-save with rustfmt, enable it for a smoother workflow.

Run Clippy to catch common mistakes and non-idiomatic patterns:

Terminal window
just check::clippy

Apply Clippy’s suggestions automatically:

Terminal window
just clippy-fix

For the best development experience, configure your editor with:

  • rust-analyzer — Provides inline type hints, go-to-definition, and real-time diagnostics.

  • Format on save — Set your editor to run rustfmt whenever you save a .rs file.

  • Clippy as the check command — Configure rust-analyzer to use clippy instead of cargo check for richer diagnostics:

    {
    "rust-analyzer.check.command": "clippy"
    }
  • Testing — the four testing tiers and what each CI stage runs.
  • Local Devnet — run a full local network for integration testing.
  • Contributing — guidelines for submitting pull requests.