rust-web-services
Installation
SKILL.md
Rust Web Services
Build Rust HTTP services with explicit state, typed boundaries, observable behavior, and production-grade runtime contracts.
Operating Model
- Read the existing service shape first: router setup, app state, middleware layers, config, database access, tests, deployment scripts, and observability.
- Prefer
axumplustowerlayers for new HTTP services unless the repo already standardizes on another framework. - Keep handlers thin. Extract inputs, call domain/service code, map results into HTTP responses.
- Make app state explicit and clone-cheap. Avoid hidden globals and ad hoc connection creation per request.
- Treat errors, tracing, timeouts, request size limits, and shutdown as part of the feature, not afterthoughts.
Reference Map
references/axum-tower-architecture.mdfor router structure, state, extractors, middleware, errors, and versioned APIs.references/runtime-config-data.mdfor Tokio runtime concerns, config, database access, background jobs, and graceful shutdown.references/testing-observability.mdfor integration tests, tracing, metrics, contract tests, and production readiness.