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.
Quick Reference
Section titled “Quick Reference”| Command | What it does |
|---|---|
just check | Runs the full check suite (format, udeps, clippy, test, deny) |
just test | Runs the test suite via cargo-nextest |
just fix | Auto-fixes formatting, clippy, and zepter issues |
just ci | Full CI pipeline (fix, check, lychee, zepter, no-std check) |
Running Tests
Section titled “Running Tests”The project uses cargo-nextest as its test runner. Install it if you have not already:
cargo install cargo-nextestRun the full test suite:
just testThis 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:
cargo nextest run -p base-execution-evmTo run a single test by name:
cargo nextest run -p base-execution-evm -- test_nameBuilding Test Contracts
Section titled “Building Test Contracts”Some tests depend on compiled Solidity contracts. If you see test failures related to missing contract artifacts, build them first:
just build-contractsSee Building from Source for details.
Checking Code Quality
Section titled “Checking Code Quality”The check recipe runs the full quality gate in sequence:
just checkThis is equivalent to running each of these in order:
check-format— Verifies that all Rust source files matchrustfmtstyle.check-udeps— Detects unused dependencies inCargo.tomlfiles.check-clippy— Runs Clippy with the project’s configured lints.test— Runs the full test suite.check-deny— Checks dependencies for known vulnerabilities and license issues viacargo-deny.
If any step fails, the pipeline stops. Fix the issue and re-run.
Auto-Fixing Issues
Section titled “Auto-Fixing Issues”Most formatting and lint issues can be fixed automatically:
just fixThis runs three fixers in sequence:
format-fix— Appliesrustfmtto all source files.clippy-fix— Applies Clippy’s suggested fixes.zepter-fix— Fixes feature propagation issues detected by zepter.
Run just fix before committing to avoid CI failures.
Full CI Pipeline
Section titled “Full CI Pipeline”To run the same checks that CI runs on pull requests:
just ciThis encompasses:
fix— auto-fix everything fixablecheck— the full quality gatelychee— checks for broken links in documentationzepter— validates Cargo feature propagationcheck-no-std— ensuresno_stdcompatibility for crates that require it
Running just ci locally before pushing is the best way to catch issues early.
Formatting
Section titled “Formatting”Check formatting without modifying files:
just check-formatAuto-format all files:
just format-fixThe project uses the standard rustfmt configuration. If your editor supports format-on-save with rustfmt, enable it for a smoother workflow.
Clippy
Section titled “Clippy”Run Clippy to catch common mistakes and non-idiomatic patterns:
just check-clippyApply Clippy’s suggestions automatically:
just clippy-fixRecommended Editor Setup
Section titled “Recommended Editor Setup”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
rustfmtwhenever you save a.rsfile. -
Clippy as the check command — Configure rust-analyzer to use
clippyinstead ofcargo checkfor richer diagnostics:{"rust-analyzer.check.command": "clippy"}
Next Steps
Section titled “Next Steps”- Local Devnet — run a full local network for integration testing.
- Contributing — guidelines for submitting pull requests.