Setting up a contributor environment
Configure your local Nix development environment, run tests, format code, and execute fuzz harnesses on the Axios codebase
Set up your local environment and learn the standard workflow for contributing to the Axios stack.
Prerequisites¶
Install the Nix package manager before continuing.
Step 1: Enter the development shell¶
Axios uses Nix to pin its toolchain, libraries, and formatters.
- Navigate to the root of your clone.
- Enter the shell:
If you havenix-shelldirenv, rundirenv allowinstead; it loads the environment automatically. - Verify the toolchain:
just --version treefmt --version
Step 2: Format code¶
The project enforces formatting across Rust, Nix, TOML, Markdown, and JSON using treefmt.
- Run from the repository root:
treefmt - Check that modified files pass before committing.
Step 3: Run tests¶
The just task runner orchestrates workspace operations.
- Run unit and property tests across all workspaces:
just test - All tests in
atom,eos,ion, andalurlshould compile and pass.
Step 4: Lint¶
Run clippy and format checks before submitting:
- Clippy:
cargo clippy --manifest-path atom/Cargo.toml cargo clippy --manifest-path eos/Cargo.toml cargo clippy --manifest-path ion/Cargo.toml cargo clippy --manifest-path alurl/Cargo.toml - Format check (Rust 2024 edition, strict):
cargo fmt --manifest-path atom/Cargo.toml -- --check cargo fmt --manifest-path eos/Cargo.toml -- --check cargo fmt --manifest-path ion/Cargo.toml -- --check
Step 5: Fuzz¶
The project uses cargo-bolero for fuzz testing URI parsers, Coz signatures, lockfiles, and manifests.
- Run all fuzzers (10 seconds each by default):
just fuzz - Target a specific fuzzer:
- URI parser:
just fuzz-uri - Signature verification:
just fuzz-verification - Raw lockfile parser:
just fuzz-lock-raw - Structured lockfile serialization:
just fuzz-lock-structured - Manifest TOML parser:
just fuzz-manifest
- URI parser:
- Custom timing:
just fuzz "-T 60s --profile release"
Step 6: Build the documentation site¶
The doc site lives in www/ and is built with sukr:
- Process specs and ADRs:
cd www && python3 process_docs.py - Build:
sukr - Output goes to
www/public/.
Commit conventions¶
Use conventional commits. Imperative mood, subject line under 50 characters, body wrapped at 72.
feat:— New user-visible functionalityfix:— Bug fixesrefactor:— Code restructuring, no behavior change (no changelog entry)docs:— Documentation-only changes- Breaking changes:
change!:,remove!:
Run treefmt before every commit.
Where things are¶
- Specifications:
docs/specs/ - Architecture decision records:
docs/adr/ - Rust toolchain: pinned in
rust-toolchain.toml(edition 2024) - Formatting:
treefmt.tomlorchestratesrustfmt,taplo,nixfmt,prettier,shfmt - Task runner:
just --listfor all available recipes