toolchains-rust-core

Installation
SKILL.md
Contains Shell Commands

This skill contains shell command directives (!`command`) that may execute system commands. Review carefully before installing.

Rust Core Toolchain Conventions

Edition and Toolchain

  • Target Rust 2024 edition. MSRV is set by the most-constrained transitive dependency, not the edition floor — pin it explicitly in Cargo.toml (rust-version = "...").
  • Gate every change on cargo fmt --check, cargo clippy -- -D warnings, and cargo test.
  • Prefer cargo nextest run for faster, isolated test execution when available.

Ownership and Borrowing

  • Borrow by default, own only when necessary. Accept &str / &[T] in function signatures, not String / Vec<T>, unless the function must take ownership.
  • Return owned values; let callers borrow. Avoid returning references tied to locals.
  • Reach for Cow<'_, str> when a value is usually borrowed but occasionally owned.
  • Use Rc/Arc only for genuine shared ownership; prefer passing references first.
  • Interior mutability: Cell/RefCell for single-threaded, Mutex/RwLock (under Arc) for shared-state concurrency. Never hold a lock across an .await.
Installs
2
GitHub Stars
14
First Seen
Jul 13, 2026
toolchains-rust-core — bobmatnyc/claude-mpm-agents