cargo-workflows

Manage Cargo workspaces, feature flags, build scripts, caching, testing, and dependency audits for Rust projects.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/awfixers-stuff/opencode-config --skill cargo-workflows-awfixers-stuff
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cargo-workflows
Source: https://github.com/awfixers-stuff/opencode-config/tree/main/skills/cargo-workflows
Command: npx skills add https://github.com/awfixers-stuff/opencode-config --skill cargo-workflows-awfixers-stuff

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Centralizes guidance for configuring and maintaining Rust Cargo workspaces, feature flags, build scripts, CI caching, test runners, and dependency auditing to reduce build complexity, avoid feature leakage, and speed up CI runs.

Core Features & Use Cases

  • Workspace orchestration with shared dependency versions, resolver = 2, virtual manifests, and member Cargo.toml patterns for monorepos.
  • Feature flag best practices including default/no-default-features, additive feature behavior, and optional dependency wiring to avoid implicit features.
  • Build script guidance for rerun directives, linking, cfg flags, setting compile-time env vars, and generating bindings for FFI.
  • CI and caching patterns for GitHub Actions including sccache or actions/cache usage, incremental build considerations, and cargo nextest integration for faster tests.
  • Dependency management and auditing workflows using cargo-audit, cargo-deny, cargo-machete, and deny.toml patterns for license and advisory policies.
  • Use case: converting a multi-crate repository into a reproducible workspace with shared dependency control, CI caching, and automated dependency checks.

Quick Start

Help me set up a Cargo workspace with shared dependency versions, resolver = 2, example member Cargo.toml files, a basic build.rs pattern, and a GitHub Actions cache configuration.

Frequently Asked Questions about cargo-workflows

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I set up a Cargo workspace with shared dependency versions for a multi-crate Rust repository?

To set up a Cargo workspace, configure a virtual manifest with resolver = 2 and define shared dependency versions in the root Cargo.toml, then use member Cargo.toml patterns to inherit those versions for reproducible multi-crate builds.

What's the best way to structure Rust feature flags to avoid implicit features and feature leakage?

Structure Rust feature flags by ensuring additive feature behavior, using default and no-default-features appropriately, and wiring optional dependencies explicitly to avoid feature leakage in Cargo workspace builds.

How do I configure GitHub Actions caching and cargo nextest for faster Rust CI builds?

Configure GitHub Actions caching for Rust by using sccache or actions/cache for incremental build considerations, and integrate cargo nextest profiles to run tests faster during CI workflows.

How do I use cargo-deny and cargo-audit to enforce dependency auditing and license policies in Rust?

Use cargo-audit and cargo-deny with a deny.toml configuration file to enforce advisory and license policies, and integrate cargo-machete to detect unused dependencies during Rust dependency auditing workflows.

How do I write a build.rs script for Rust FFI bindings and compile-time environment variables?

Write a build.rs script to set compile-time environment variables, issue rerun directives, pass cfg flags, and generate FFI bindings, ensuring proper linking and build script execution during Rust compilation.

Does this Skill work for converting an existing multi-crate Rust repository into a reproducible workspace?

Yes, this Skill applies to converting multi-crate Rust repositories into reproducible workspaces by providing patterns for workspace configuration, shared dependency control, CI caching, and automated dependency checks.