domain-web

Installation
Summary

Web service architecture with async handlers, type-safe extractors, and middleware composition.

  • Enforces async-first design to prevent blocking request handlers; use spawn_blocking for CPU-intensive work
  • Manages shared application state via Arc<T> and Arc<RwLock<T>> to ensure thread safety across concurrent requests
  • Provides extractor pattern for request parsing and validation (e.g., State(db), Json(payload)) with unified error responses via IntoResponse
  • Supports tower-based middleware layers for cross-cutting concerns like authentication, logging, and rate limiting
  • Covers framework patterns for axum, actix-web, warp, and rocket with guidance on state lifecycle and request resource ownership
SKILL.md

Web Domain

Layer 3: Domain Constraints

Domain Constraints → Design Implications

Domain Rule Design Constraint Rust Implication
Stateless HTTP No request-local globals State in extractors
Concurrency Handle many connections Async, Send + Sync
Latency SLA Fast response Efficient ownership
Security Input validation Type-safe extractors
Observability Request tracing tracing + tower layers

Critical Constraints

Async by Default

Related skills

More from zhanghandong/rust-skills

Installs
579
GitHub Stars
1.1K
First Seen
Jan 20, 2026