domain-web

Design Rust web services with axum, actix-web, warp, or rocket.

Updated Feb 12, 2026
One-click install
npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill domain-web-jmduea
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-web
Source: https://github.com/jmduea/emotiv-cortex-rs/tree/main/.github/skills/domain-web
Command: npx skills add https://github.com/jmduea/emotiv-cortex-rs --skill domain-web-jmduea

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Developers need clear constraints and design guidance to build Rust web services that are fast, secure, and scalable, but the ecosystem offers many frameworks and patterns that can cause inconsistency and hidden performance issues.

Core Features & Use Cases

  • Defines domain constraints such as stateless HTTP, concurrency handling, latency expectations, security validation, and observability.
  • Maps constraints to concrete Rust patterns like async/await, Arc‑based shared state, extractor ownership, and tower middleware layers.
  • Provides framework comparisons (axum, actix-web, warp, rocket) and key crate recommendations for servers, clients, authentication, and databases.
  • Offers design patterns for extractors, error handling, middleware composition, and shared application state.

Quick Start

Ask the skill to outline a Rust async HTTP API architecture using axum with thread‑safe shared state and request‑scoped validation.

Frequently Asked Questions about domain-web

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I design a Rust web service with thread-safe shared state and async safety?

To design a Rust web service with async safety, apply Arc-based shared state, extractor ownership, and async/await patterns. This ensures thread-safe concurrency and request-scoped resources while managing stateless HTTP requests securely.

What is the best way to compare Rust web frameworks like axum, actix-web, warp, and rocket?

Comparing Rust web frameworks like axum, actix-web, warp, and rocket involves evaluating their async execution, middleware layering, and extractor patterns. Framework comparisons map these constraints to concrete Rust patterns for building secure, scalable HTTP servers.

How do I structure tower middleware layers for a Rust REST API?

Structuring tower middleware layers for a Rust REST API requires defining domain constraints like security validation and latency expectations. Apply middleware composition design patterns to handle async execution and thread-safe shared state effectively across HTTP requests.

Does this approach support building WebSocket applications with tokio?

Yes, this approach supports building WebSocket applications using tokio. It defines domain constraints for async execution and concurrency handling, mapping them to tokio and Rust web frameworks to satisfy functional needs for secure, real-time WebSocket connections.

What are the limitations of using async execution for shared application state in Rust?

Limitations of async execution for shared application state in Rust include hidden performance issues and concurrency handling complexity. Applying Arc-based shared state and request-scoped resources mitigates these risks by ensuring thread-safe, stateless HTTP operations.