rust-workflow

Guide Rust project setup with Clippy, rustfmt, and cargo workflows.

Updated Apr 11, 2023
One-click install
npx skills add https://github.com/salverius-tech/dotfiles --skill rust-workflow
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust-workflow
Source: https://github.com/salverius-tech/dotfiles/tree/main/home/dot_claude/skills/rust-workflow
Command: npx skills add https://github.com/salverius-tech/dotfiles --skill rust-workflow

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill provides a comprehensive set of guidelines and commands to ensure efficient, safe, and maintainable Rust project development, covering everything from linting and testing to error handling and documentation.

Core Features & Use Cases

  • Standardized Tooling: Integrates essential Rust tools like Clippy, rustfmt, and cargo for consistent code quality.
  • Best Practice Enforcement: Details requirements for trait implementations, error handling patterns (thiserror/anyhow), memory safety, and module organization.
  • Testing & Documentation: Outlines strategies for unit and integration testing, along with documentation standards for public APIs.
  • Use Case: When starting a new Rust project or onboarding a new developer, this Skill serves as a definitive guide to setting up the project correctly and adhering to idiomatic Rust practices.

Quick Start

Run cargo fmt --check && cargo clippy -- -D warnings && cargo test to validate your Rust code.

Frequently Asked Questions about rust-workflow

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

FAQPage Schema
How do I set up a standardized Rust workflow for code quality and testing?

A standardized Rust workflow integrates cargo, clippy, and rustfmt to enforce code quality, alongside comprehensive testing strategies and documentation standards to ensure maintainable codebases.

What is the best way to handle errors in Rust using thiserror and anyhow?

Idiomatic Rust error handling uses thiserror for custom library error types and anyhow for application-level error management, ensuring robust and maintainable code execution.

How do I configure Clippy and rustfmt to enforce Rust best practices?

You configure Clippy and rustfmt through standard cargo commands to enforce strict linting rules and consistent code formatting, achieving reproducible builds and maintainable codebases.

Can I use this Rust workflow to organize project modules and public API documentation?

Yes, this Rust workflow provides specific guidelines for module organization and documentation standards for public APIs, ensuring your project remains maintainable and idiomatic.

When do I need to apply memory safety principles in Rust development?

Memory safety principles in Rust must be applied continuously during development to enforce safe memory management, preventing common bugs and ensuring robust application performance.