agentsclimarketplace

Rust tooling cicd

Skill fusengine/agents/plugins/rust-expert/skills/rust-tooling-cicd

Use when structuring a Cargo workspace, wiring features, or building a Rust CI pipeline — fmt, clippy, cargo-deny, cargo-audit, nextest, doc-tests, coverage, MSRV. Covers the canonical CI gate order and supply-chain checks. Do NOT use for writing the tests themselves (use rust-testing-quality) or non-Rust CI.From its SKILL.md

Install
npx -y skills add fusengine/agents --skill rust-tooling-cicd

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 22 stars22 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

SKILL.md

4.6 KB, ~1.0k tokens by cl100k_base, as published. Nobody here has run it

Rust Tooling & CI/CD

Agent Workflow (MANDATORY)

Before ANY tooling/CI work, use TeamCreate to spawn 3 agents:

  1. fuse-ai-pilot:explore-codebase - Inspect existing Cargo.toml, workspace layout, .github/workflows
  2. fuse-ai-pilot:research-expert - Verify current cargo / cargo-deny / nextest docs via Context7/Exa
  3. mcp__context7__query-docs - Check workspace-inheritance and feature-unification specifics

After implementation, run fuse-ai-pilot:sniper for validation.


Overview

LayerTool(s)Purpose
LayoutCargo workspacesOne Cargo.lock, one target/, shared metadata
Configfeatures, workspace.dependenciesOptional functionality, single source of versions
Format/lintcargo fmt, cargo clippyStyle + correctness lints, warnings as errors
Supply chaincargo deny, cargo auditLicenses, bans, duplicate/yanked/vulnerable crates
Testcargo nextest, cargo test --docFast parallel run + doc-tests
Coverage/MSRVcargo llvm-cov, cargo hackLine coverage, minimum-supported-Rust matrix

Critical Rules

  1. Gate order is fixed - fmt → clippy → deny → audit → nextest → test --doc → coverage. Cheap, fast-failing checks run first.
  2. -D warnings on clippy in CI - cargo clippy --all-targets --all-features -- -D warnings. A warning must fail the build.
  3. Commit deny.toml - supply-chain policy is code; it must be reviewed and versioned.
  4. Centralize versions in workspace.dependencies - members inherit with dep.workspace = true; never pin the same crate twice.
  5. cargo test --doc is a separate step - nextest never runs doc-tests (see rust-testing-quality).

Architecture

my-workspace/
├── Cargo.toml            # [workspace] members + workspace.dependencies + lints
├── Cargo.lock            # single lockfile, committed
├── deny.toml             # supply-chain policy, committed
├── crates/
│   ├── core/Cargo.toml   # inherits version.workspace = true
│   └── cli/Cargo.toml
└── .github/workflows/ci.yml

→ See ci-workflow.md and deny-toml.md


Reference Guide

Concepts

TopicReferenceWhen to Consult
Workspaces & featuresworkspaces-features.mdStructuring members, inheriting deps, feature design, MSRV
CI gateci-gate.mdOrdering checks, cargo-deny/audit, coverage

Templates

TemplateWhen to Use
ci-workflow.mdGitHub Actions pipeline
deny-toml.mdSupply-chain policy + workspace root

Quick Reference

The full local gate

cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo deny check
cargo audit
cargo nextest run --all-features
cargo test --doc
cargo llvm-cov --all-features --workspace

Workspace dependency inheritance

# root Cargo.toml
[workspace.dependencies]
serde = { version = "1", features = ["derive"] }

# member Cargo.toml
[dependencies]
serde = { workspace = true }

→ See deny-toml.md for the complete root manifest


Best Practices

DO

  • Fail fast: run fmt and clippy before the expensive test/coverage steps
  • Keep one [workspace.dependencies] as the version source of truth
  • Run cargo hack --feature-powerset check to catch broken feature combinations
  • Run cargo machete to prune unused dependencies

DON'T

  • Let clippy warnings pass CI (use -D warnings)
  • Duplicate crate versions across members instead of inheriting
  • Skip cargo deny because "audit already ran" — they check different things
  • Forget cargo test --doc after nextest

What ships with it: 5 files

13.7 KB alongside SKILL.md

Keep looking

Skills are one crate of 325,949. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.