Development Setup
This page walks through everything needed to build and run aphid from source on your local machine.
Prerequisites
Rust toolchain
aphid is written in Rust. Install the toolchain via rustup:
|
Follow the on-screen prompts to complete the installation. Once finished, make sure ~/.cargo/bin is on your PATH (rustup normally sets this up for you). Verify the installation:
aphid requires Rust 1.75 or later. If you already have Rust installed, make sure you are up to date:
Git
You will need Git to clone the repository. Most systems ship with it, but you can verify:
On macOS you can install it via Xcode Command Line Tools (xcode-select --install) or Homebrew (brew install git). On Linux, use your distribution's package manager.
Clone and build
The first build downloads and compiles all dependencies, so it takes a while. Subsequent builds are incremental and much faster.
Run the test suite
To run a single test by name:
Linting and formatting
Before committing, always run:
These are the same checks that CI enforces on every pull request.
Running locally
The repository includes a documentation site under docs/ that doubles as a convenient test fixture. Build it:
Or start the dev server with live reload:
Then open http://localhost:3000 in your browser. Any changes to content or templates trigger an automatic rebuild and browser refresh.
Next steps
- Read Contributing for the pull request workflow and commit conventions.
- See CLI reference for the full list of commands and flags.
- Browse the Configuration reference to understand
aphid.toml.