Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when writing, reviewing, or refactoring Rust code. Routes the task to handbook chapters on idioms, lints, errors, testing, generics, and pointers under the edition 2024 and current-stable pins.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
설치 방법 보기설치하기 전에 에이전트에게 전달되는 지시 내용을 확인할 수 있습니다.
| Field | Bound contract |
|---|---|
| Trigger | Rust code is being written, reviewed, or refactored, or a Rust design choice about borrowing, error handling, dispatch, or testing needs the idiomatic answer. |
| Authority | Reversible local: writes only the Rust source and project files the invoking task already touches; rollback is version-control restore. No remote mutation. |
| Side effect | Rust source files may change under the invoking task; chapter guidance and verification output go to chat. |
| Done | The code or review follows the conventions below, the routed chapters were consulted, and the toolchain verification ran clean or its failure is reported. |
Cargo.toml, rust-toolchain.toml, and the edition pin.&T over .clone() unless ownership must move; take &str over String and &[T] over Vec<T> in parameters; use Cow<'_, T> when ownership is ambiguous.Copy types: passing a small Copy type by value is a heuristic, not a rule. The handbook's threshold is about two to three machine words, roughly 24 bytes on a 64-bit target, because the copy avoids a pointer indirection. The real cutoff depends on the target's register and calling conventions; measure when the path is hot.Result<T, E> for fallible operations; keep panic! for unrecoverable bugs; use thiserror for library error types and anyhow for application binaries; propagate with ?.unwrap() and expect() stay out of production paths; tests and examples may use them.--release; run cargo clippy -- -D clippy::perf for hints; avoid cloning in loops; prefer iterators and avoid intermediate .collect() calls.dyn Trait for heterogeneous collections; box at API boundaries, not internally.// comments carry why (safety, workarounds, rationale); /// doc comments carry what and how on public API; every TODO names a tracking issue; enable #![deny(missing_docs)] on libraries.cargo fmt --check, cargo clippy --all-targets --all-features --locked -- -D warnings, and cargo test. A lint that must be suppressed uses #[expect(clippy::lint)] with a justification comment, never a bare #[allow]. Done when: all three commands pass or each failure is reported with its cause.Chapter content is inherited from the pinned handbook sources; the headline Rust 1.98.1 pin does not independently revalidate its per-feature and library assertions.
| File | Read when |
|---|---|
references/chapter_01.md | Borrowing vs cloning, Copy, Option/Result handling, iterators, comments, when to extract a function |
references/chapter_02.md | Clippy configuration, key lints, workspace lint setup |
references/chapter_03.md | Profiling, redundant clones, stack vs heap, zero-cost abstractions |
references/chapter_04.md | Result vs panic, thiserror vs anyhow, error hierarchies |
references/chapter_05.md | Test naming, one assertion per test, snapshot testing |
references/chapter_06.md | Static vs dynamic dispatch, trait objects |
references/chapter_07.md | Compile-time state safety with the type-state pattern |
references/chapter_08.md | When to comment, doc comments, rustdoc |
references/chapter_09.md | Thread safety, Send/Sync, pointer types |
| Failure class | Behavior |
|---|---|
cargo clippy missing | Install it with rustup component add clippy; clippy ships as a rustup component in lockstep with rustc, not as a separately versioned package. |
| Clippy false positive | Suppress with #[expect(clippy::lint)] and a justification comment; expect warns once the lint stops firing, so the suppression cannot go stale. |
| Heuristic conflicts with measurement | The measurement wins; a heuristic states a default, not a law. |
| Project pins an older toolchain | Work inside the project's pin and report which conventions need a newer toolchain. |
Rust code or review feedback that follows the conventions above, with the toolchain verification results or the blocking failure named.
아직 리뷰가 없습니다. 사용해 본 소감을 남겨 주세요.
로그인 없이 쓸 수 있습니다. 사용 후기, 질문, 작동하지 않은 환경 등을 편하게 남겨 주세요.
아직 댓글이 없습니다. 첫 댓글을 남겨 보세요.
Use when explaining System V AMD64, ARM AAPCS, RISC-V psABI, stack frames, variadic calls, or FFI register rules. Not for the Rust FFI binding layer: use rust-ffi.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when configuring ADC sampling time, DMA-driven ADC, calibration, or DAC channel setup on bare-metal MCUs. Not for the DMA stream itself: use dma-baremetal.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when creating AF_XDP sockets, configuring UMEM and XSK rings, writing an XDP redirect program, or choosing copy versus zero-copy mode. Not for full kernel bypass: use dpdk.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a completed session needs an agent-environment retrospective. Not for an engineering retrospective from telemetry: use engineering-retrospective.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a redacted, trimmed agent transcript must be appended to a GitHub PR or issue body, with human approval and preview. Not for automated or model-initiated insertion.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.
Use when a repo needs agent setup, AGENTS.md added or made lean, CLAUDE.md audited, or agent instructions scored or pruned. Not for remote, credential, publish, deploy, or irreversible changes.
한국어 요약은 준비 중입니다. 원문 설명을 표시하고 있습니다.