rust-rustrover-cargo

rust-rustrover-cargo is a cursor rule for Cursor from moeru-ai/auv. It costs 0 tokens per session (457 once invoked), scanned A, original, Apache-2.0.

A rule for editing Rust code with RustRover MCP, a tool for understanding code structure, and Cargo, Rust's build and test tool, for validation.

In plain words
What is it for?
Use it when changing Rust types, traits, methods, APIs, or their callers, including renames and project-wide edits.
Why use it?
It provides a defined way to find Rust symbols and callers, then checks formatting, compilation, tests, and the final diff.

Cursor rule for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add rules/moeru-ai/auv/rust-rustrover-cargo
Clone the repo
git clone --depth 1 https://github.com/moeru-ai/auv

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for rust-rustrover-cargo

README.md
[![agentmods](https://agentmods.dev/badge/rules/moeru-ai/auv/rust-rustrover-cargo.svg)](https://agentmods.dev/rules/moeru-ai/auv/rust-rustrover-cargo)
Your own site
<a href="https://agentmods.dev/rules/moeru-ai/auv/rust-rustrover-cargo"><img src="https://agentmods.dev/badge/rules/moeru-ai/auv/rust-rustrover-cargo.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Nothing until a file matches its globs; then the whole rule loads.
When invoked 457 The whole file, excluding the scripts and references it only reads on demand.
Security scan A 0 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.00457
Opus 5 $0.00000 $0.00229
Sonnet 5 $0.00000 $0.00091
Haiku 4.5 $0.00000 $0.00046

Measured 4d ago against content hash 751d2db58821, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade A, and why

rust-rustrover-cargo scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Nothing flagged

None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.

.cursor/rules/rust-rustrover-cargo.mdc · 56 lines

What it actually says

Rust: RustRover MCP + Cargo (AUV)

When this rule applies, treat RustRover MCP as the required structure layer and terminal Cargo as the required validation authority.

Before editing Rust

  1. Confirm RustRover MCP (user-rustrover) is available; read tool schemas before calling.
  2. Locate symbols with MCP first:
    • search_symbolget_symbol_info
    • analyze_calls when changing public APIs, traits, or call sites
    • search_file for crate/test/fixture paths
  3. Do not start with plain grep/rg for structural Rust work (types, traits, methods, callers).
  4. Plain text search is still OK for: docs, fixtures, JSON artifacts, logs, comments, literal CLI strings — after semantic lookup fails or target is non-code.

While editing

  • Prefer rename_refactoring for symbol renames across the workspace.
  • Optional: reformat_file on touched files (helper only; not proof of correctness).
  • Optional: get_file_problems / build_project for fast IDE feedback.

After editing Rust (required)

Run from repo root before claiming done:

cargo fmt --check
cargo check
cargo test   # or a narrow filter when the slice is localized
git diff --check

If CLI/MCP/command catalog behavior changed, also run:

cargo run --quiet -- list-commands

MCP unavailable

If RustRover MCP is down or not indexed:

  1. Say so explicitly in the summary.
  2. Fall back to read + minimal rg only for the assigned slice.
  3. Still run the full Cargo validation block above — no skip.

Non-goals

  • RustRover build/diagnostics do not replace cargo check / cargo test.
  • Do not bypass Cargo validation because IDE feedback looked clean.
Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 56 lines · 0 tokens per session scan A 751d2db58821

Subscribe to this mod's changes

rust-rustrover-cargo is a cursor rule published in the GitHub repository moeru-ai/auv (25 stars, last pushed 4d ago), licensed Apache-2.0. It costs nothing until one of its globs matches a file; then it loads 457 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-30.