rust-guide

Installation
SKILL.md

Rust Guide

Applies to: Rust 2021 edition+, Systems Programming, CLIs, WebAssembly, APIs

Core Principles

  1. Ownership Clarity: Every value has one owner; borrowing is explicit and intentional
  2. Result Over Panic: Return Result<T, E> for all fallible operations; panic! is a bug
  3. Zero-Cost Abstractions: Use iterators, generics, and traits without runtime overhead
  4. Minimal Unsafe: Default to #[forbid(unsafe_code)]; justify every unsafe block in writing
  5. Clippy Compliance: All code passes cargo clippy -- -D warnings with zero exceptions

Guardrails

Edition & Toolchain

  • Use Rust 2021 edition (edition = "2021" in Cargo.toml)
  • Set rust-version (MSRV) in Cargo.toml for all published crates
  • Use stable toolchain unless a nightly feature is explicitly justified
Related skills
Installs
12
Repository
ar4mirez/samuel
First Seen
Feb 20, 2026