Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Contributing

This guide covers setting up a local development environment for contributing to Eidetica.

Prerequisites

Eidetica uses Nix for reproducible development environments. Install Nix with flakes enabled, or use the Determinate Systems installer which enables flakes by default. The Nix flake provides pinned versions of all development tools: Rust toolchain, cargo-nextest, mdbook, formatters, and more.

If you want to skip Nix, a standard Rust toolchain should be sufficient. The main project is structured as a Cargo workspace.

Command Runner

just provides convenient commands for common workflows. Commands wrap cargo, nix, and other tools as needed.

just   # See all available commands

Common Commands

CommandDescription
just buildFast incremental build
just testRun tests with cargo nextest
just lintLinting (clippy, audit, etc.)
just fmtMulti-language formatting
just ciFull local CI pipeline
just ci nixNix CI pipeline

Testing

CommandDescription
just testUnit and integration tests via nextest
just test docCode examples in /// doc comments
just doc testCode examples in mdbook documentation

Nix Commands

Direct Nix commands are available when needed:

CommandDescription
nix developEnter the development shell
nix buildBuild the default package
nix flake checkRun all CI checks
nix build .#test.defaultRun default tests (sqlite)
nix build .#test.allRun all tests including all backends
nix build .#lint.defaultRun fast lints (clippy, deny, statix…)
nix run .#testInteractive test runner (override with TEST_BACKEND)
nix run .#fixAuto-fix linting issues and format code
nix run .#benchRun benchmarks interactively
nix run .#coverageRun coverage interactively

Packages are organized into groups: test, doc, lint, coverage, sanitize. Each group supports .#<group>.default (fast), .#<group>.all (all), and .#<group>.<name> (specific). See CI/Build Infrastructure for details.

Binary caching via a binary cache speeds up builds by providing pre-built dependencies.

Development Workflow

  1. Enter the dev shell: nix develop or use direnv
  2. Make changes
  3. Build: just build
  4. Test: just test
  5. Lint: just lint
  6. Format: just fmt
  7. Run full CI locally before pushing: just ci

CI Integration

The same checks that run locally also run in CI. See CI/Build Infrastructure for details on the CI systems.