Skip to Content
Amaru
Amaru LightContributing

Development

Build, test and lint Amaru Light from source, run its credential-free test suites, and follow how CI publishes images and how releases are tagged.

These are the commands and rules for changing Amaru Light's code.

Before you begin

Rust at the release pinned in rust-toolchain.toml, and Podman or Docker for the image checks. Keep the toolchain on the same release as the Rust stage of the Containerfile.

Check your change

make check          # cargo fmt --check, clippy -D warnings, cargo test
make image-check    # build the base image and smoke-test it (podman or docker)

The crate follows the lint configuration of Wanaku: no unwrap, expect, panic or unsafe outside tests, and short functions.

Tests

  • Unit tests live next to the code, for example src/lifecycle/tests.rs and src/scheduler/tests.rs.
  • tests/amaru_cli.rs runs the command line end to end.
  • The tests use fake agent and gh scripts and temporary Git repositories; they need no credentials.
  • cargo test -p amaru-guard runs a stand-in model through ONNX Runtime; cargo test -p amaru-guard -- --ignored downloads the real model.

Continuous integration

.github/workflows/ci.yml runs on each pull request, each push to main and each release tag: format, clippy and test jobs, and an image build smoke-tested on amd64 and arm64. After all jobs pass, pushes to main and release tags publish the image. The optional repository variables CONTAINER_REGISTRY (default ghcr.io) and CONTAINER_GROUP change where it goes.

Releases

  1. Set version in Cargo.toml, run cargo check so Cargo.lock agrees, and merge.
  2. Push a bare version tag on that commit: git tag 0.1.0 && git push origin 0.1.0.

CI stops when the tag differs from the version in Cargo.toml.

Based on README.md – Development, docs/prompt-guard.md and .github/workflows/ci.yml.

Next steps

On this page