Rust Router
Load this first for non-trivial Rust work, then load only the smallest useful follow-on skill.
Working stance
- Start from the concrete problem: error, boundary, hot path, or unsafe edge.
- Prefer one language skill plus at most one domain or architecture skill.
- Use the general
letaskill for code navigation, references, implementations, and refactors. - If the answer starts turning into a tutorial, stop and cut back to the decision that matters.
- When a local fix needs clones, locks, trait-object escape hatches, or unsafe code, re-check the design before keeping the patch.
Route by question
- Ownership, borrowing, aliasing, or interior mutability:
rust-memory-and-state - Trait bounds, generics, API shape, newtypes, or typestate:
rust-types-and-apis - Error shape, panic boundary, or library-versus-binary handling:
rust-errors - Unit-test helper shape, fixtures, table tests, serialized tests, or rich
assertions:
rust-unit-testing - Tasks,
Send/Sync, blocking, channels, or cancellation:rust-async-and-concurrency - Allocation pressure, layout, or benchmark discipline:
rust-performance-and-layout unsafe, foreign function interface (FFI), layout guarantees, or soundness:rust-unsafe-and-ffi- Crate boundaries, features, public surface, or layering:
arch-crate-design - Dependency hygiene,
cargo-vet,cargo-deny, SemVer guardrails:arch-supply-chain - Recording a hard-to-reverse architectural decision (Y-Statement):
arch-decision-records - Verification tool selection (Miri, proptest,
cargo-mutants,loom,shuttle,turmoil, Kani, Verus):rust-verification; deep dives inproptest,kani, andverus - HTTP services, middleware, or request state:
domain-web-services - CLIs, workers, daemons, or long-running jobs:
domain-cli-and-daemons no_std, firmware, devices, or edge nodes:domain-embedded-and-iot
Pairing rules
- Web services usually pair
domain-web-serviceswithrust-async-and-concurrencyorrust-errors. - CLIs and daemons usually pair
domain-cli-and-daemonswithrust-errors. - Embedded and IoT usually pair
domain-embedded-and-iotwithrust-memory-and-stateorrust-unsafe-and-ffi. - If two language skills both seem necessary, load the one that explains the failure and keep the other in reserve.
Escalate when
- borrow-checker fixes keep adding clones or
Arc<Mutex<_>>without clarity, - a public API needs
dyn Any, erased errors, or unstable generic sprawl, - async code requires shared mutable state and cancellation semantics at once,
- performance claims appear before measurements,
- unsafe code exists without a crisp invariant list.
Read routing-matrix.md only when the route is still unclear.
Source: leynos/rust-skill — distributed by TomeVault.