ms-rust
Installation
SKILL.md
Rust Development
House style for every Rust change, however small.
Process:
- Read references/style-and-design.md once per session before the first Rust edit
- Make every new or modified line conformant
- Document every public item with M-CANONICAL-DOCS sections (
Examples/Errors/Panics/Safety/Abortwhen applicable) - Write comments in American English unless the user explicitly requests another language
- When the file is fully compliant, add a comment:
// Rust guideline compliant {date}where {date} is the guideline date/version
Non-negotiables (see references for detail)
- Panics mean "stop the program". Panic only on programming errors and poisoned locks; return
Resultfor situational failures. Never introduce anErrortype for contract violations. unsafeimplies UB. Mark a functionunsafeonly when misuse can cause undefined behavior; everyunsafeblock carries aSafetydoc section listing caller obligations. Prefer safe APIs (e.g.,windowscrate wrappers) over raw FFI.- No weasel words. No
Manager/Service/Factorytypes; name by what the type does (Bookings,BookingDispatcher);Builderis the canonical factory. - Windows API and FFI work follows the ms-win32 skill — it owns the Win32 correctness, FFI declaration, and DLL-boundary rules. Load it alongside this one; its rules are deliberately not restated here.