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.

Task Runner

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

task --list   # See all available tasks

Common Commands

CommandDescription
task buildFast incremental build
task testRun tests with cargo nextest
task clippyStrict linting
task fmtMulti-language formatting
task ci:localFull local CI pipeline
task ci:nixNix CI pipeline

Testing

CommandDescription
task testUnit and integration tests via nextest
task test:docCode examples in /// doc comments
task book: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

Binary caching via Cachix 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: task build
  4. Test: task test
  5. Lint: task clippy
  6. Format: task fmt
  7. Run full CI locally before pushing: task ci:local

CI Integration

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