What problem does it solve?
Rust projects often struggle with maintainability as they grow; this Skill provides architectural patterns to keep codebases modular and scalable.
Core Features & Use Cases
- Hexagonal Architecture (Ports & Adapters): isolates domain logic from infrastructure, enabling easy testing and swapping implementations.
- Onion/ Clean Architecture patterns: organizes code into concentric layers with clear dependency rules.
- Domain-Driven Design concepts: bounded contexts, entities, value objects, and domain services to model complex domains in Rust.
- Module Organization guidance: file-based vs mod.rs structure, visible boundaries, and re-exports to create stable public APIs.
- Dependency Injection guidelines: constructor-based injection, when to use generics vs trait objects, and composition roots for wiring.
Quick Start
To begin, create a new Rust project and apply the patterns by defining domain models, ports, and adapters; organize modules following the recommended structure; and start implementing services that depend on abstracted interfaces rather than concrete infrastructures.