rust-systems-design

Guides Rust systems architecture covering ownership, concurrency, error handling, and idiomatic design patterns.

Updated May 16, 2026
One-click install
npx skills add https://github.com/organvm-i-theoria/_agent-ontology --skill rust-systems-design-organvm-i-theoria
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: rust-systems-design
Source: https://github.com/organvm-i-theoria/_agent-ontology/tree/main/.agents/skills/rust-systems-design
Command: npx skills add https://github.com/organvm-i-theoria/_agent-ontology --skill rust-systems-design-organvm-i-theoria

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Designing memory-safe, high-performance systems in Rust requires navigating the borrow checker, choosing between async and blocking I/O, and selecting the right crates and patterns—decisions that are costly to get wrong. ## Core Features & Use Cases - Architecture Guidance: Recommends patterns like Actor model, ECS, Pipeline, and Type-State based on whether you are building a CLI, web server, embedded system, or library. - Idiomatic Rust Review: Enforces ownership and borrowing best practices, trait-based polymorphism, explicit error handling with thiserror/anyhow, and scrutiny of unsafe blocks. - Crate Recommendations: Suggests established ecosystem crates such as serde, clap, reqwest, sqlx, and tokio. - Use Case: When starting a new async web service, ask for an architecture review and receive a Tokio-based design with channel-based worker communication, custom error types, and a Builder-pattern configuration. ## Quick Start Ask the assistant to design a Rust system, for example: design an async CLI tool in Rust that processes files concurrently with proper error handling.

Frequently Asked Questions about rust-systems-design

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

FAQPage Schema
How do I design error handling in a Rust application?▼

Rust error handling uses Result and Option types with custom error enums. Use thiserror to derive Error implementations for libraries and anyhow with context for application-level error propagation, avoiding unwrap in production code.

When should I use async Tokio versus blocking I/O in Rust?▼

Use async with Tokio when handling many concurrent connections such as web servers or network services. Blocking I/O is sufficient for CLIs and simple tools where sequential execution keeps the code simpler.

What Rust crates are recommended for building a CLI?▼

The clap crate is the standard choice for CLI argument parsing in Rust. Combine it with serde for configuration serialization and anyhow for ergonomic error handling in the application layer.

How do I share state between threads in Rust safely?▼

Use Arc with Mutex for shared mutable state across threads, or RwLock for read-heavy workloads. For message-passing concurrency, Tokio mpsc channels let workers communicate without shared memory.

When is unsafe Rust acceptable in systems code?▼

Unsafe Rust is acceptable only when safe abstractions cannot express the required operation, such as FFI boundaries or custom memory layouts. Every unsafe block should be scrutinized and wrapped in a safe API.