Repository navigation
Description
Summary
Reviewed our root Cargo.toml against the workspace config of mb/apps/risk-iq/risk-iq (a Rust 2024 workspace with a heavily documented manifest and strict lint posture). The comparison surfaced a handful of items worth deciding on. None are bugs; they are policy choices to confirm or adopt.
Findings
1. resolver = "2" vs "3" (functional difference)
risk-iq uses resolver = "3"; we use "2". Resolver 3 changes feature-unification behavior for target-specific dependencies (it no longer unifies features across cfg-gated deps). This is the one real functional difference. Confirm "2" is deliberate — if not, moving to "3" is a one-line change with a lockfile regeneration.
2. Missing cheap lint wins
risk-iq enables lints we don't, several of which align with our existing anti-panic / code-quality stance:
missing_docs = "warn"(we havemissing_debug_implementationsbut not this)unreachable_pub = "warn"elided_lifetimes_in_paths = "warn"print_stdout/print_stderr/dbg_macroasdeny— consistent with our anti-panic posturetodo/unimplemented/unreachableasdeny
3. cast_* lints are warn here, deny there
We set cast_possible_truncation / cast_sign_loss / cast_precision_loss to warn. risk-iq sets the whole cast family to deny (with as_conversions to keep the count explicit). Given our numeric-safety rationale (payment amounts, byte offsets), consider whether these should be deny.
4. Dev-profile test-speed tuning
risk-iq optimizes [profile.dev] for test speed: debug = "line-tables-only", debug = false for dependencies, and opt-level = 3 on hot deps (their Argon2 case: 33.9s → 4.9s on one test module). We keep [profile.dev] at defaults and tune only [profile.release]. Our test suite is large; this pattern may be worth measuring.
5. nursery clippy group
risk-iq enables the nursery group (safe for them because their toolchain is pinned). We don't. Not necessarily a gap — but worth a deliberate decision given our pinned toolchain.
Notes
- Both workspaces share the same conventions we already follow: single shared version,
[workspace.lints], extensive per-dependency rationale comments,default-features = falsewhere it matters, and explicit TLS-provider choices. - risk-iq's
unsafe_code = "forbid"andmissing_debug_implementationsmatch ours.
Suggested action
Decide on items 1–4 (item 5 is optional). Item 1 is the only one with a behavioral impact; the rest are lint-policy and profile choices.
Activity
fix(docs,lints): correct wrong doc comments and narrow two lint escap…
chore(cargo): adopt resolver 3 and tighten the workspace lint posture (…