- Rust 1.85+ (see
rust-toolchain.toml) - PostgreSQL 16+ (local or Docker)
cargo-deny,sqlx-cli(optional but recommended)- Docker (for testcontainers integration tests)
# Clone and enter repo
cd Aether
# Copy environment template
cp .env.example .env
# Start PostgreSQL
docker compose up -d postgres
# Run migrations
export DATABASE_URL=postgres://aether:aether@localhost:5432/aether
sqlx migrate run
# Build workspace
cargo build --workspace
# Run server (dev)
cargo run -p aether-server --bin monitor-server
# Enroll agent (separate terminal)
cargo run -p aether-agent --bin monitor-agent -- enroll \
--server-url https://localhost:8443 \
--token <token>crates/
aether-agent/ # monitor-agent binary
aether-server/ # monitor-server binary
aether-protocol/ # wire formats + signing
aether-domain/ # pure domain logic
aether-database/ # sqlx repositories
aether-shared/ # errors, crypto, TLS
aether-telemetry/ # tracing
aether-test-utils/ # test helpers
migrations/ # sqlx migrations
tests/integration/ # cross-crate integration tests
make check # fmt + clippy + test
make fmt # cargo fmt
make lint # clippy -D warnings
make test # cargo test --workspace
make deny # cargo deny check
make migrate # sqlx migrate runcargo test -p aether-domain
cargo test -p aether-protocolRequires Docker:
cargo test -p aether-database --features integration-tests
cargo test --test security_agent_authcargo sqlx prepare --workspace
# Commit .sqlx/ directory
SQLX_OFFLINE=true cargo build| Feature | Crate | Purpose |
|---|---|---|
development-insecure-http |
agent, server | Plain HTTP for local tests only |
integration-tests |
database, test-utils | testcontainers |
timescale |
database | Future TimescaleDB support |
Never enable development-insecure-http in release builds.
For local HTTPS without insecure feature:
# Generate self-signed cert
openssl req -x509 -newkey rsa:4096 -keyout key.pem -out cert.pem \
-days 365 -nodes -subj "/CN=localhost"
export AETHER_TLS_CERT=./cert.pem
export AETHER_TLS_KEY=./key.pemOr use development-insecure-http feature for tests only:
cargo test -p aether-server --features development-insecure-httpcargo fmt— rustfmt perrustfmt.tomlcargo clippy --workspace --all-targets -- -D warnings- No
unwrap()/expect()in production code paths - Errors:
thiserrorin libs,anyhowin binaries - Time:
timecrate, notchrono
sqlx migrate add description_here
# Edit migrations/<timestamp>_description_here.sql
sqlx migrate run
cargo sqlx prepare --workspacemonitor-agent diagnostics sign-test \
--method POST \
--path /api/v1/agent/heartbeat \
--body '{"observed_at":"…"}'Prints canonical string and signature for manual verification.
GitHub Actions .github/workflows/ci.yml:
- fmt check
- clippy
- deny check
- test (with postgres service)
- verify no
development-insecure-httpin release
Ensure DATABASE_URL is set or use SQLX_OFFLINE=true with prepared queries.
Tests use fixed timestamps; check AETHER_CLOCK_SKEW_SECS if flaky.
Set DOCKER_HOST or ensure Docker daemon running.
See AGENTS.md for crate conventions and PR guidelines.