
Domain Web
Rust web-service guide that maps domain constraints to axum, actix, tower, and shared-state patterns.
- skills.sh installs
- 3.5K
- GitHub stars
- 1.6K
- last updated
- Aug 21, 2026
Own this skill? Claim it
What it does
- Covers async handlers, thread-safe shared state, request-scoped extractors, and tower middleware layers for Rust web services
- Includes a framework comparison (axum, actix-web, warp, rocket), a key-crates table, and an axum handler with unified error responses
- Enforces rules such as no blocking in handlers (use
spawn_blocking) andArcfor state shared across threads - Designed for Rust developers building HTTP, REST, or WebSocket services who need design guidance beyond the framework API
Install
$ npx -y skills add actionbook/rust-skills --skill domain-web -yInstalls into .agents/skills for every agent it finds here, and .claude/skills for Claude Code.
Files
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
RULE: Web handlers must not block
WHY: Block one task = block many requests
RUST: async/await, spawn_blocking for CPU work
State Management
RULE: Shared state must be thread-safe
WHY: Handlers run on any thread
RUST: Arc<T>, Arc<RwLock<T>> for mutable
Request Lifecycle
RULE: Resources live only for request duration
WHY: Memory management, no leaks
RUST: Extractors, proper ownership
Trace Down ↓
From constraints to design (Layer 2):
"Need shared application state"
↓ m07-concurrency: Use Arc for thread-safe sharing
↓ m02-resource: Arc<RwLock<T>> for mutable state
Details
- Repository
- github.com/actionbook/rust-skills
- Categories
- Rust, Backend & APIs
- First seen
- May 16, 2026
More from actionbook/rust-skills
All 38- Domain Cli3.5K
- Rust Learner3.4K
- Rust Skill Creator3.4K
- Rust Deps Visualizer3.3K
- Meta Cognition Parallel3.3K
- Rust Daily3.3K
- Domain Embedded3.2K
- Domain Cloud Native3.2K
- Domain Fintech3.1K
- Domain Ml3.1K
- Domain Iot3K
- Rust Router3K
- Core Agent Browser2.3K
- Core Dynamic Skills2.1K
- Core Actionbook2.1K
- Core Fix Skill Docs2.1K
- M15 Anti Pattern9.4K
- Coding Guidelines4.3K
- M10 Performance4K
- M07 Concurrency3.8K
- M06 Error Handling3.8K
- M01 Ownership3.7K
- M05 Type Driven3.7K
- M04 Zero Cost3.7K
Similar to Domain Web
More Rust
axum-web-frameworkmanutej/luxor-claude-marketplace664 installsComplete Axum guide covering routing, extractors, middleware, state, error handling, and deployment for Rust web services.
axumbobmatnyc/claude-mpm-skills510 installsProduction Rust API patterns for Axum: typed extractors, shared state, Tower middleware, error mapping, and graceful shutdown.
m07-concurrencyactionbook/rust-skills3.8K installsThread-safety and async guidance for Send/Sync errors, locking choices, and deadlock or race debugging.
domain-cloud-nativeactionbook/rust-skills3.2K installsReference catalog of cloud-native design rules and Rust crates for building Kubernetes-ready services.
rust-async-patternswshobson/agents22.2K installsProduction async Rust patterns for Tokio, covering tasks, channels, streams, and error handling.
rust-prosickn33/agentic-awesome-skills458 installsExpert Rust guidance for async services, type-system design, unsafe review, and performance work on Rust 1.75+.