cargo

Provide cargo subcommand guidance for Rust project management workflows.

60|13|Updated Dec 22, 2025
One-click install
npx skills add https://github.com/plurigrid/asi --skill cargo
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: cargo
Source: https://github.com/plurigrid/asi/tree/main/skills/cargo
Command: npx skills add https://github.com/plurigrid/asi --skill cargo

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill encapsulates Rust project workflows, from creation to publishing, including build, test, dependencies, workspaces, and packaging.

Core Features & Use Cases

  • Build & Test: Compile, run tests, and iterate quickly.
  • Package Management: Add, remove, and update dependencies.
  • Workspaces & Publishing: Manage multi-crate repos and publish crates.

Quick Start

Create a new crate with cargo new myproject, enter it, and run cargo build.

Frequently Asked Questions about cargo

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

FAQPage Schema
How do I build and test a Rust project with cargo?

Cargo automates Rust project building and testing. Use `cargo build` to compile your project and `cargo test` to run all tests. These commands handle dependency resolution and compilation automatically within your workspace.

How do I add and manage dependencies in a Rust project?

Cargo manages dependencies through the Cargo.toml file. Add dependencies with `cargo add <crate>`, remove them with `cargo remove <crate>`, and update with `cargo update`. Cargo resolves and downloads crates automatically from the registry.

Can I organize multiple Rust crates in a single repository?

Yes, cargo workspaces let you manage multiple crates in one repository. Define a workspace in Cargo.toml at the root, list member crates, and cargo handles building, testing, and publishing them together or individually.

How do I publish a Rust crate to a registry?

Cargo packages and publishes crates using `cargo package` to create a distributable archive and `cargo publish` to upload to the registry. Cargo validates metadata, dependencies, and documentation before publishing.

What's the difference between cargo build, cargo run, and cargo bench?

Cargo build compiles your project; cargo run compiles and executes the binary; cargo bench compiles and runs performance benchmarks. Each subcommand serves a specific phase of Rust development workflows.