
Domain Web
This kicks in when you're building web services in Rust, whether that's REST APIs, GraphQL endpoints, or WebSocket servers. It covers the domain constraints that matter for web development: why handlers must be async (blocking one task blocks many requests), how to manage shared state with Arc and RwLock, and proper request lifecycle patterns. You get framework comparisons between axum, actix, warp, and rocket, plus the critical patterns like extractors for parsing requests and IntoResponse for unified error handling. The focus is on tracing down from web-specific constraints (stateless HTTP, concurrency, latency SLAs) to concrete Rust implementations. Most useful when you need to understand why web frameworks work the way they do, not just copy-paste handler examples.
- skills.sh installs
- 3.4K
- GitHub stars
- 1.6K
- last updated
- Aug 21, 2026
Install
$ npx -y skills add actionbook/rust-skills --skill domain-web --agent claude-codeInstalls into .claude/skills of the current project.
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
Sponsors
Details
- Repository
- github.com/actionbook/rust-skills
- Categories
- Backend & APIs, Security, Rust
- First seen
- May 16, 2026
More from actionbook/rust-skills
All 38- Domain Cli3.4K
- Rust Learner3.3K
- Rust Skill Creator3.3K
- Rust Deps Visualizer3.2K
- Meta Cognition Parallel3.2K
- Rust Daily3.2K
- Domain Embedded3.1K
- Domain Cloud Native3K
- Domain Fintech3K
- Domain Ml3K
- Domain Iot2.9K
- Rust Router2.9K
- Core Agent Browser2.2K
- Core Dynamic Skills2K
- Core Actionbook2K
- Core Fix Skill Docs2K
- M15 Anti Pattern9.3K
- Coding Guidelines4.2K
- M10 Performance3.8K
- M07 Concurrency3.7K
- M06 Error Handling3.7K
- M01 Ownership3.6K
- M04 Zero Cost3.6K
- M05 Type Driven3.6K