composable-rust-architecture

Design event-driven architectures with five-type Composable Rust patterns.

Updated Nov 5, 2025
One-click install
npx skills add https://github.com/jonathanbelolo/composable-rust --skill composable-rust-architecture
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: composable-rust-architecture
Source: https://github.com/jonathanbelolo/composable-rust/tree/main/.claude/skills/composable-rust-architecture
Command: npx skills add https://github.com/jonathanbelolo/composable-rust --skill composable-rust-architecture

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill codifies expert patterns for building event-driven systems using the Composable Rust framework, enabling teams to design reducers, state machines, effects, stores, and environments with confidence.

Core Features & Use Cases

  • Five-type architecture: State, Action, Reducer, Effect, and Environment form a unified data flow.
  • Pure reducers & testability: Reducers are deterministic and side-effect descriptions are returned for execution by the Store.
  • Store orchestration: Typed environments and a central store coordinate actions and effects across the system.
  • Design guidance: Practical patterns for reducers, actions, state design, and environment integration in real-world Rust backends.

Quick Start

Define the five types, implement a simple reducer, wire a store, and send a sample action to observe state transitions.

Frequently Asked Questions about composable-rust-architecture

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

FAQPage Schema
How do I design a Rust event-driven architecture with reducers and stores?

Rust event-driven architecture is structured around five fundamental types: State, Action, Reducer, Effect, and Environment. This pattern enforces unidirectional data flow, using pure reducers and a typed store to coordinate actions and side-effect orchestration.

What is the best way to manage state and side effects in a Rust backend?

Managing state and side effects in a Rust backend is handled by returning side-effect descriptions from pure reducers for execution by the store. This approach keeps reducers deterministic and supports highly testable store patterns across your system.

How does CQRS and event-sourcing work with unidirectional data flow in Rust?

CQRS and event-sourcing in Rust work by routing actions through a central store that orchestrates effects via environment traits. This unidirectional data flow enforces static dispatch and separates state transitions from effect execution.

Can I use static dispatch and environment traits for Rust state machines?

Static dispatch and environment traits can be used for Rust state machines to ensure type-safe effect execution. The architecture favors static dispatch over dynamic dispatch to maintain performance while coordinating actions across typed environments.

Why should I use pure reducers in a Rust state machine architecture?

Pure reducers in a Rust state machine architecture ensure deterministic state transitions by isolating side effects. Instead of executing effects directly, reducers return effect descriptions for the store to process, enhancing testability and predictability.

When do I need a typed environment trait in a Rust store pattern?

A typed environment trait in a Rust store pattern is needed when orchestrating side effects like API calls or database interactions. It allows the store to execute effects abstractly, ensuring reducers remain pure and testable across different environments.