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.
git clone --depth 1 https://github.com/adonai-labs/agent-runwayWrote 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.
[](https://agentmods.dev/rules/adonai-labs/agent-runway/rust-development)<a href="https://agentmods.dev/rules/adonai-labs/agent-runway/rust-development"><img src="https://agentmods.dev/badge/rules/adonai-labs/agent-runway/rust-development.svg" alt="Measured on agentmods" height="20"></a>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.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.01724 |
| Opus 5 | $0.00000 | $0.00862 |
| Sonnet 5 | $0.00000 | $0.00345 |
| Haiku 4.5 | $0.00000 | $0.00172 |
Grade A, and why
rust-development 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 3d 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.
How it starts
The opening of the file, as written. The whole thing — 137 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Rust Development Guidelines
Directives for Rust development. Apply when working with .rs files or Cargo.toml.
Ownership and Borrowing
- Prefer borrowing over moving when the caller needs the value afterwards; use
&Tor&mut T. - Move by default when transferring ownership; assignment moves for non-
Copytypes. - Clone only when necessary — cloning is explicit and can be expensive; prefer references.
- Use
&strover&Stringfor function parameters when you only need to read. - Return owned values from functions when the caller should own the result; avoid returning references to local data.
- Borrow mutably (
&mut T) only when you need to modify; avoid overlapping mutable borrows. - Use
into_iter()when consuming a collection; useiter()when you need references. - Do not return references to temporary or stack-allocated data.
let s1 = String::from("hello");
let s2 = s1; // move; s1 invalid
let s3 = &s2; // borrow; s2 still valid
Lifetimes
- Add explicit lifetimes when the compiler cannot infer them (e.g. function returns a reference derived from parameters).
- Rely on elision when the rules apply: one input ref → output ref gets that lifetime; one
&self/&mut self→ output ref gets that lifetime. - Use
'staticonly for data that lives for the whole program; avoid for general-purpose APIs. - Structs holding references need lifetime parameters:
struct Excerpt<'a> { part: &'a str }. - Prefer owned types when lifetimes make the API complex; sometimes
Stringis simpler than&strin public APIs.
Smart Pointers
- Box<T> — Single ownership, heap allocation; use for recursive types, large values, or trait objects.
- Rc<T> — Shared ownership, single-threaded; use when multiple owners need the same value (e.g. graphs, shared config).
- Arc<T> — Thread-safe shared ownership; use when sharing across threads; pair with
MutexorRwLockfor mutability. - Avoid Rc/Arc when possible — they add overhead; prefer borrowing or owned values when ownership is clear.
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.
- 3d ago First seen · 137 lines · 0 tokens per session scan A 0beda4b19307
rust-development is a cursor rule published in the GitHub repository adonai-labs/agent-runway (2 stars, last pushed 17d ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 1,724 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-09-03.
Other cursor rules, from other repositories
rust
Rust best practices for Solana smart contract development using Anchor framework and Solana SDK.
rust-general
General Rust rules for safe, idiomatic application and library development.
cli-handler
Patterns for Sruja CLI command handlers. Keeps the CLI thin and consistent.
wasm-constraints
WASM-only crate constraints. Violations here break browser/Node builds.
core-engine
Patterns for Core Engine crates (language, engine, diagnostics, graph, graph-core, scan).
rust
Rules applied when working in Rust files.