ohmyrust logo ohmyrust

Rust AI-Agent Reference Index

Pick one tool per layer. Query and selection persist in the URL.

Deterministic 6-Command CLI Loop

Zero-dependency Node.js scripts (or unified ohmyrust.mjs) returning --json and exit code 0 (clean) or 2 (blocking).

Step Command What it guarantees
1. Bootstrap node skills/ohmyrust/scripts/ohmyrust.mjs new cli my-app Scaffolds cli, lib, service, workspace, or rune-gui with lints and .ohmyrust/project.json.
2. Audit Env node skills/ohmyrust/scripts/ohmyrust.mjs doctor --json Detects installed tools, RUSTC_WRAPPER conflicts, workspace layout, and tokio feature bloat.
3. Retrofit node skills/ohmyrust/scripts/ohmyrust.mjs init --apply --linker mold --ci github Idempotently writes clippy.toml, [lints], deny.toml, justfile, and GitHub Actions CI.
4. Static Scan node skills/ohmyrust/scripts/ohmyrust.mjs audit --json Sub-50ms 12-rule scan (prod .unwrap(), panic!(), undocumented unsafe, silent drops, unpinned git deps) + 0 to 100 score.
5. Compact node skills/ohmyrust/scripts/ohmyrust.mjs clean --apply --json Measures ./target size and compacts stale artifacts via cargo-gc or cargo-steward.
6. Final Gate node skills/ohmyrust/scripts/ohmyrust.mjs gate --json Runs audit, fmt, clippy -D warnings, nextest/test, deny, and machete; marks missing tools degraded.

Install Across 6 Agents

Requires Node.js 18+. Automatically installs into Claude Code, Codex, Gemini/Antigravity, Cursor, and OpenCode.

git clone https://github.com/agnogad/ohmyrust.git && node ohmyrust/bin/install.js

Hard Invariants

  • One RUSTC_WRAPPER: Never stack kache, sccache, and cargo-steward.
  • Bounded ./target: Wrap long agent loops with cargo gc or cargo steward.
  • Zero prod panics: .unwrap() and .expect() allowed in #[cfg(test)] only.
  • Explicit safety: Every unsafe needs // SAFETY:; every #[allow] needs reason = "...".
  • Honest gates: Missing tools report degraded, never silent pass.