wado-lang/wado / .claude/skills/rust
rust
VerifiedWorkspace-specific Rust rules that override common habits: panic instead of dummy or no-op fallbacks, never catch a panic outside tests, enums over unclear bool parameters, no wildcard match arms, dependencies managed in the workspace Cargo.toml, 2024 edition, zero warnings and clippy lints. Read before writing or editing Rust (.rs) code.
- Manage dependencies in the workspace
Cargo.toml. - Use the
panic!macro instead of falling back to meaningless dummy values or no-op implementations. - Never catch a panic in production code. A panic is a bug, and it ends the run. So there is no
catch_unwind, a task is joined throughwado_host::sync::joinedrather than itsJoinErrorturned into an error value, and a thread's panic is resumed where it is joined. Tests may catch one. - Take an
enumrather than aboolwhere the call site would not say what the flag means.f(x, true)makes the reader openf, andf(x, Mode::Strict)does not. - Use the
2024edition. - Keep the code free of compiler warnings and Clippy lints.
mise run clippyruns-D warnings, so any warning or lint fails it. - Import every item you name. A
crate::orsuper::path goes in auseitem at the top of the module; where the item is read, write its name.use crate::elaborator::sem::Ty;thenTy, nevercrate::elaborator::sem::Tyinline. Alias a collision (use crate::ast::Ty as AstTy;) rather than spelling the path out. Auseinside a function body counts as inline. Apub(in …)is exempt: it names a scope rather than reading an item, and Rust admits no import there.mise run check-rust-pathsgates this against the empty baselinescripts/rust-inline-paths.json. Its detector (package-gale/tools/rust_inline_paths.wado) parses with the Gale Rust grammar, so the grammar decides what counts as a path.mise run list-rust-paths <file.rs>…lists what a file carries. - Avoid wildcard match arms (
_ => ...) unless absolutely necessary.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| finishing-a-development-branchobra/superpowersUse when implementation is complete, all tests pass, and you need to decide how to integrate the work | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| systematic-debuggingobra/superpowersUse when encountering any bug, test failure, or unexpected behavior, before proposing fixes | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| test-driven-developmentobra/superpowersUse when implementing any feature or bugfix, before writing implementation code | Stars: 319k | Updated | Claude CodeCodex | Verified | Install |
| skill-creatoranthropics/skillsCreate new skills, modify and improve existing skills, and measure skill performance. Use when users want to create a skill from scratch, edit, or optimize an existing skill, run evals to test a skill, benchmark skill performance with variance analysis, or optimize a skill's description for better triggering accuracy. | Stars: 196k | Updated | Claude CodeCodex | Verified | Install |