domain-web

Map web domain constraints to Rust design patterns and framework choices.

51|6|Updated Mar 28, 2019
One-click install
npx skills add https://github.com/Mte90/dotfiles --skill domain-web-mte90
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: domain-web
Source: https://github.com/Mte90/dotfiles/tree/main/.config/opencode/skills/domain-web
Command: npx skills add https://github.com/Mte90/dotfiles --skill domain-web-mte90

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill addresses the complexities of building secure, scalable, and efficient web services, particularly within the Rust ecosystem. It guides developers in making design choices that align with the inherent constraints of web development.

Core Features & Use Cases

  • Constraint-Driven Design: Understand how web domain rules (statelessness, concurrency, latency) translate into specific Rust design patterns and implications.
  • Framework Guidance: Provides a comparison of popular Rust web frameworks (Axum, Actix-web, Warp, Rocket) and their best use cases.
  • Key Crate Identification: Lists essential crates for HTTP handling, client requests, JSON serialization, authentication, and database interaction.
  • Pattern Implementation: Demonstrates common design patterns like Extractors, Error Responses, Middleware, and Shared State management.
  • Use Case: When designing a new REST API in Rust, use this Skill to understand the trade-offs between different frameworks and how to implement robust error handling and state management.

Quick Start

Use the domain-web skill to understand how to implement shared state management in an Axum web service.

Frequently Asked Questions about domain-web

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

FAQPage Schema
How do I choose between Rust web frameworks like Axum, Actix-web, Warp, and Rocket?

Choosing between Axum, Actix-web, Warp, and Rocket depends on your web service constraints. This guidance compares their best use cases by mapping domain rules like statelessness, concurrency, and latency SLAs to specific Rust design implications.

How do I implement shared state management in an Axum web service?

Implement shared state management in Axum by applying Rust async and thread-safety patterns. This involves using specific design patterns for request lifecycle management to ensure robust state handling across concurrent operations.

What Rust crates do I need for building a REST API with JSON and authentication?

Building a REST API requires key Rust crates for HTTP handling, client requests, JSON serialization, authentication, and database interaction. This guidance identifies these essential crates to help you structure secure backend services efficiently.

How does Rust async programming affect backend services and request lifecycle management?

Rust async programming directly impacts backend services by requiring strict thread-safety and request lifecycle management. Translating web domain constraints into design patterns ensures your service meets latency SLAs and handles concurrency safely.

What is the best way to handle error responses and middleware in Rust backend services?

The best way to handle error responses and middleware in Rust backend services is through specific design patterns like Extractors. Mapping domain constraints to these patterns ensures secure and scalable web service implementation.