AGENT SKILL
lang-rust
Safe Rust by default, borrow checker compliance, miri validation of unsafe blocks, clippy -D warnings, and explicit error handling via Result/Option.
- License 许可
- MIT
- 所属仓库
- WASDst/photoshow
- 最近更新
- 2026-10-08
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- lang-rust
- description
- Safe Rust by default, borrow checker compliance, miri validation of unsafe blocks, clippy -D warnings, and explicit error handling via Result/Option.
02 资源文件 6
- 参考文档checks/rust-rules.md126 B
- 脚本examples/safe_rust.rs103 B
- 参考文档manifest.json1.6 KB
- 参考文档references/rust-safety-miri.md63 B
- 脚本scripts/verify.sh129 B
- 参考文档templates/rust-verification-report.md71 B
03 SKILL.md 正文
Rust Safe-by-Default Contract
1. Safe by Default & Unsafe Quarantine
- Production code must be
#![forbid(unsafe_code)]unless an explicit waiver is registered in.prumo/escape-hatches.json. - Any required
unsafeblock must state its safety invariants with// SAFETY:and be tested undercargo miri.
2. Error Handling & Unwraps
- Prohibit
.unwrap()and.expect()in non-test paths. Propagate errors via?operator or return typed errors usingthiserror. - Compile with
cargo clippy --all-targets -- -D warnings.
04 同仓库更多 Skills
goal-management
暂无简介
★ 0
evidence-collection
暂无简介
★ 0
code-review
暂无简介
★ 0
testing-quality
Testing pyramid, deterministic tests, regression tests, behavior assertions, test isolation, flaky detection, representative fixtures
★ 0
rust-analyzer-context-indexing
暂无简介
★ 0
release-engineering
暂无简介
★ 0