rust-ui-architecture

Community

Architect scalable Rust UI apps with GPUI.

Authorgeoffjay
Version1.0.0
Installs0

System Documentation

What problem does it solves? Designing a scalable and maintainable architecture for Rust UI applications, especially with frameworks like GPUI, can be challenging without clear guidelines on project structure, layer separation, and state management. This Skill provides a blueprint for robust application design.

Core Features & Use Cases

  • Application Structure: Recommended project layout and a four-layer architecture (UI, Application, Service, Domain) for clear separation of concerns and modularity.
  • Component Hierarchies: Guidance on patterns like Container-Presenter for effectively managing state and rendering logic within your UI components.
  • State Management Architecture: Implement unidirectional data flow, single source of truth, and hierarchical ownership patterns for predictable and robust state handling.
  • Use Case: A team is building a complex Rust UI application and needs to ensure its architecture supports long-term growth and maintainability. This Skill provides a blueprint for organizing code, managing dependencies, and establishing clear boundaries between different parts of the application.

Quick Start

// Example of UI Layer accessing Model pub mod ui { use gpui::; use super::models::;

pub struct DocumentView {
    model: Model<DocumentModel>,
    _subscription: Subscription,
}

impl Render for DocumentView {
    fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoElement {
        let model = self.model.read(cx);
        div().child(format!("Words: {}", model.document.word_count()))
    }
}

}

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 Claude Code Installation

Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.

Please help me install this Skill:
Name: rust-ui-architecture
Download link: https://github.com/geoffjay/claude-plugins/archive/main.zip#rust-ui-architecture

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 223,000+ vetted skills library on demand.