Rust

Guide Rust development with Cargo, Clippy, rustfmt, and Criterion.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/vdemeester/home --skill rust-vdemeester
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Rust
Source: https://github.com/vdemeester/home/tree/main/dots/.config/claude/skills/Rust
Command: npx skills add https://github.com/vdemeester/home --skill rust-vdemeester

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill guides Rust development with modern patterns, best practices, and tooling to build robust, idiomatic Rust code.

Core Features & Use Cases

  • Cargo & Clippy: Build, lint, and test with modern Rust tooling.
  • Error Handling: Idiomatic patterns using thiserror and anyhow.

Quick Start

Scaffold a project with cargo new, then run cargo test.

Frequently Asked Questions about Rust

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

FAQPage Schema
How do I write idiomatic Rust code with best practices?

Idiomatic Rust follows ownership and borrowing rules, explicit error handling with thiserror or anyhow, and zero-cost abstractions. Use Cargo to scaffold projects, Clippy to lint against anti-patterns, and rustfmt to enforce consistent style. The Rust Book and API Guidelines document official standards.

How do I test and benchmark Rust code?

Run tests with `cargo test` for unit and integration tests. Use Criterion for benchmarking performance-critical code. Cargo manages test discovery and execution across your project structure automatically.

What's the best way to handle errors in Rust?

Use thiserror for custom error types in libraries and anyhow for applications. Both crates integrate with Cargo and enforce explicit error handling patterns, making error flow traceable and idiomatic across your codebase.

How do I manage dependencies and prepare a crate for publishing?

Cargo manages dependencies in Cargo.toml and coordinates multi-crate workspaces. Run `cargo publish` to release crates after linting with Clippy and testing. Official guidelines ensure your crate meets ecosystem standards.

Can I use Cargo, Clippy, and rustfmt together in one workflow?

Yes. Cargo orchestrates building, testing, and running your project. Clippy lints for correctness and idioms. Rustfmt formats code. All three integrate seamlessly and can be run together to enforce safe, consistent code.

Does this cover multi-crate workspace projects?

Yes. Cargo supports multi-crate workspaces with shared dependencies and coordinated builds. The Skill covers designing workspace structure, managing interdependencies, and publishing multiple crates following community best practices.