rdos-rust-patterns

Enforce Rust best practices for the R-DOS TUI file manager.

7|Updated May 26, 2015
One-click install
npx skills add https://github.com/thrashr888/QDOS --skill rdos-rust-patterns
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rdos-rust-patterns
Source: https://github.com/thrashr888/QDOS/tree/main/.claude/skills/rdos-rust-patterns
Command: npx skills add https://github.com/thrashr888/QDOS --skill rdos-rust-patterns

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides essential Rust coding standards and patterns to ensure robust, maintainable, and efficient development for the R-DOS project.

Core Features & Use Cases

  • Error Handling: Demonstrates idiomatic Result usage for fallible operations.
  • State Management: Shows how to define and derive common traits for state structures.
  • External Processes: Illustrates safe execution of external commands, suppressing output.
  • File Operations: Provides a pattern for detecting sibling files within a directory.
  • Documentation Standards: Outlines best practices for module and function-level documentation.
  • Quality Checks: Lists essential commands for code formatting, linting, and testing.

Quick Start

Follow the provided Rust code examples for error handling and state management when developing new features for R-DOS.

Frequently Asked Questions about rdos-rust-patterns

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

FAQPage Schema
What are the best practices for Rust error handling in a TUI file manager?

Idiomatic Rust error handling in a TUI file manager uses the `Result` type for fallible operations, ensuring robust state management and safe external process execution. This pattern enforces explicit error recovery.

How do I safely execute external processes in Rust without terminal output?

To safely execute external processes in Rust, use the standard library's command execution patterns while explicitly suppressing output. This prevents external commands from corrupting the TUI interface.

How do you manage Rust state structures with derived traits?

Managing Rust state structures with derived traits involves defining structs and deriving common traits like `Debug` and `Clone`. This approach ensures maintainable state management across the file manager application.

What commands are needed to enforce Rust coding standards and quality checks?

Enforcing Rust coding standards requires running `cargo fmt` for code formatting, `clippy` for linting, and `cargo test` for testing. These commands ensure code quality and adherence to project standards.

What is the pattern for detecting sibling files within a directory in Rust?

The pattern for detecting sibling files within a directory in Rust involves using file operation modules to read directory contents and filter for specific sibling files. This ensures accurate file detection.

Do I need any external dependencies to implement these Rust file manager patterns?

You do not need external dependencies to implement these Rust file manager patterns. The Skill relies on standard Rust idioms, derived traits, and built-in file operation modules without requiring additional packages.