rust-pro

Installation
SKILL.md

Rust Professional Development

Goal: Write idiomatic, high-performance, and memory-safe Rust code following standard community practices (The Rust Way).

1. Core Principles

  • Ownership & Borrowing: strictly enforce ownership rules. Avoid .clone() unless necessary. Use Arc<Mutex<T>> or RwLock<T> for shared state only when message passing (mpsc) is not viable.
  • Error Handling: Use Result<T, E> with thiserror for libraries and anyhow for applications. Never use .unwrap() in production code; use .expect() with a context message or ? operator.
  • Async Runtime: Default to tokio for general purpose apps. Use join_all for parallel execution of futures.
  • Type System: Leverage traits and generics for zero-cost abstractions. Use New Type pattern to enforce validation at compile time.

2. Toolchain & Ecosystem

  • Build System: cargo
  • Linter: clippy (Treat warnings as errors in CI)
  • Formatter: rustfmt
  • Testing: Built-in #[test] and cargo test. Use mockall for mocking traits.

3. Recommended Project Structure

Related skills
Installs
1
GitHub Stars
429
First Seen
Feb 10, 2026