Skip to content

Cargo.toml review: findings from comparing against risk-iq workspace config #1836

Closed

Description

@thiras

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 have missing_debug_implementations but not this)
  • unreachable_pub = "warn"
  • elided_lifetimes_in_paths = "warn"
  • print_stdout / print_stderr / dbg_macro as deny — consistent with our anti-panic posture
  • todo / unimplemented / unreachable as deny

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 = false where it matters, and explicit TLS-provider choices.
  • risk-iq's unsafe_code = "forbid" and missing_debug_implementations match 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

  1. added
    rust
    prio:low
    on Aug 26, 2026
  2. assigned and unassigned on Aug 26, 2026
  3. moved this from Backlog to Ready in deCDNon Aug 26, 2026
  4. self-assigned this
    on Sep 1, 2026
  5. moved this from Ready to In progress in deCDNon Sep 1, 2026
  6. moved this from In progress to Done in deCDNon Sep 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

prio:lowrust

Type

No type

Fields

Priority

None yet

Projects

  • Status
    Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions