- Rust 93.4%
- Shell 4.5%
- Dockerfile 1.7%
- Just 0.4%
| .github/workflows | ||
| .sqlx | ||
| ci | ||
| services/game | ||
| .dockerignore | ||
| .gitignore | ||
| Cargo.lock | ||
| Cargo.toml | ||
| clippy.toml | ||
| deny.toml | ||
| Dockerfile | ||
| justfile | ||
| justfile.ci | ||
| README.md | ||
| rust-toolchain.toml | ||
| rustfmt.toml | ||
alysia-game
The game service — registry, matchmaking, transfers, scores, push relay —
extracted from the alysia monorepo
(services/game at f4841ad5f308d0a3c997c863822b0b893fb1267c, moved
byte-identical).
Today: owns the server_registry table (statically seeded with the lobby)
and serves GET /v1/registry plus the heartbeat
POST /v1/servers/heartbeat (liveness: upsert nonce + load +
last_seen, 60 s expiry filtered at read time by the matchmaker), the
queue (POST /v1/queue/join|leave), the 1 s-tick matchmaker (groups
signups by mode, writes pending_transfers with expiry, publishes
match.found), the pending transfers (GET /v1/transfers/pending,
DELETE /v1/transfers/{player}), the generic scores sink
(POST + GET /v1/scores), the push-relay poll
(GET /events/poll backed by per-stream NATS pumps), plus the common
surface every Alysia service exposes (healthz, ping, gRPC Pinger +
grpc.health.v1). The durable JetStream stream (ALYSIA_GAME) is
ensured at boot.
Layout
| Path | Role |
|---|---|
services/game/ |
The service crate: src/ (router, registry, queue, matchmaker, transfers, scores, relay, binary), migrations/ (registry, scores, liveness, queue, public endpoint, pending transfers + expiry), tests/ (container-backed integration + relay/matchmaker unit tests) |
.sqlx/ |
Scoped offline query metadata: this service's queries only (regenerate with just sqlx-prepare) |
Dockerfile |
Single-binary image (alysia/game), adapted from the monorepo's infra/services/Dockerfile |
deny.toml |
cargo-deny allow list narrowed to this workspace's graph (no Pumpkin/Cedar chains) |
justfile |
Consumer wrapper: import "justfile.ci" plus sqlx-prepare |
justfile.ci, ci/ |
Vendored from alysia-ci-templates at TEMPLATE_REV — never patched locally |
Commands
just ci-lint # fmt + clippy (-D warnings) + machete + deny
just --set test_args "" ci-test # full test suite (container-backed, needs podman)
just --set image alysia/game ci-build # local image alysia/game:local
Never push an image by hand: alysia/game:<sha> ships only through CI
(main and tags). The shared crates (alysia-nats, alysia-proto,
alysia-service, alysia-test) resolve as exact git deps on the
versioned
alysia-libs tag libs-v0.1.0 —
no path deps across repos, no vendored copies.
Vendoring
- Template updates: re-vendor
justfile.ci+ci/at the new tag, bumpTEMPLATE_REVin.github/workflows/ci.yml(ci-freshnessenforces the match). - Libs updates: bump the
tagon the fouralysia-*git deps inservices/game/Cargo.toml, refreshCargo.lock, re-run the gate.