Skip to content

chore(rust): deny unused Cargo dependencies in the fuzz, size-fixture and oracle workspaces - #318

Merged
jan-kubica merged 1 commit into
mainfrom
chore/side-workspace-unused-deps
Nov 19, 2026
Merged

jan-kubica merged 1 commit into
mainfrom
chore/side-workspace-unused-deps

Conversation

@jan-kubica

@jan-kubica jan-kubica commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Follow-up to #317, which enabled Cargo's built-in unused_dependencies lint (deny) for the main workspace. Three crates are their own Cargo workspaces, so they do not inherit it. CI builds each of them:

  • fuzz/ (cargo check --manifest-path fuzz/Cargo.toml --bins; its only targets are the fuzz binaries)
  • crates/stdnum-wasm-size-fixture/ (cargo clippy --all-targets in the size gate that build:wasm runs)
  • scripts/rust-oracle/ (cargo build --release in the oracle job)

Each now sets [lints.cargo] unused_dependencies = "deny", so a dependency that no target uses fails those builds. No dependency is currently unused, and no published package changes.

Validation: the CI jobs listed above build each manifest with Rust 1.100.0.

Summary by CodeRabbit

  • Chores
    • Unused dependencies are now reported as errors in the WebAssembly size fixture, fuzzing package and Rust oracle.

@jan-kubica
jan-kubica enabled auto-merge (squash) November 19, 2026 12:04
@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@coderabbitai

coderabbitai Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Three package manifests now configure Cargo to deny unused dependencies. The affected packages are the WASM size fixture, fuzz, and Rust oracle.

Changes: Auxiliary manifest lint settings

Layer / File(s) Summary
Set the lint in auxiliary manifests
crates/stdnum-wasm-size-fixture/Cargo.toml, fuzz/Cargo.toml, scripts/rust-oracle/Cargo.toml
Each manifest sets the Cargo unused_dependencies lint to deny.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Change: Other

Possibly related PRs

  • stella/stdnum#317: Enables the same lint in the main workspace; this PR extends that setting to three auxiliary workspaces.
Merge Risk: Minimal · up to 38bf0

This adds a build-time check that fails on unused dependencies in the fuzz, size-fixture and oracle manifests. It has no effect on published packages, and there is no concrete merge risk.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the change: denying unused Cargo dependencies in the fuzz, size-fixture and oracle workspaces. The raw summary shows the same change in all three manifests (fuzz/Cargo.toml, crates/std…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the change: denying unused Cargo dependencies in the fuzz, size-fixture and oracle workspaces. The raw summary shows the same change in all three manifests (fuzz/Cargo.toml, crates/stdnum-wasm-size-fixture/Cargo.toml, scripts/rust-oracle/Cargo.toml), each adding a three-line lint setting. The objectives confirm the aim: builds fail when a dependency is unused. The title is specific and matches the changeset.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: stella/stdnum
  • Branch: main
  • File: .coderabbit.yaml
  • Commit: 5a2aca4
  • Layers: Repository YAML
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 63132702-edb1-461d-9f43-ae65383533d8
Commits

Reviewing files that changed from the base of the PR and between 5a2aca4 and 38bf0de.

Files selected for processing: 3

  • crates/stdnum-wasm-size-fixture/Cargo.toml
  • fuzz/Cargo.toml
  • scripts/rust-oracle/Cargo.toml

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Recent review details

Context from checks skipped due to timeout: 9

  • GitHub Check: CodeRabbit
  • GitHub Check: Pack
  • GitHub Check: Changeset
  • GitHub Check: Lint
  • GitHub Check: Rust
  • GitHub Check: Bindings and packages
  • GitHub Check: Oracle
  • GitHub Check: Test
  • GitHub Check: Version sync
Additional context used

Code guidelines: 1

AGENTS.md — configured
Path-based instructions: 1

Source excerpt: Treat legal data, personal data, and repository secrets as sensitive.

CodeRabbit inference engine (AGENTS.md)

Files:

  • crates/stdnum-wasm-size-fixture/Cargo.toml
  • fuzz/Cargo.toml
  • scripts/rust-oracle/Cargo.toml
Additional comments: 1

fuzz/Cargo.toml: 1

24-24: Functional Correctness

The fuzz package has no library target, so the --bins check covers all its targets.

The comment assumes that the fuzz package also has a library target. The manifest declares only the validate_id binary, and fuzz/src/lib.rs does not exist. With no library target, cargo check --manifest-path fuzz/Cargo.toml --bins builds every target in the package. The unused-dependency lint therefore runs under this CI command. The CI command does not need a change for this lint.

@jan-kubica
jan-kubica merged commit 2a5e5ef into main Nov 19, 2026
16 checks passed
@jan-kubica
jan-kubica deleted the chore/side-workspace-unused-deps branch November 19, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant