rust

Define Rust conventions, patterns, and cargo-based tooling guidance.

Updated Jun 9, 2017
One-click install
npx skills add https://github.com/dixonwille/.dotfiles --skill rust-dixonwille
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rust
Source: https://github.com/dixonwille/.dotfiles/tree/main/claude/.claude/skills/rust
Command: npx skills add https://github.com/dixonwille/.dotfiles --skill rust-dixonwille

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Defines Rust conventions, patterns, and tooling guidance to help teams write consistent, safe, and maintainable Rust code across projects.

Core Features & Use Cases

  • Documentation patterns: module docs with //!, and item docs with ///, including practical examples.
  • Testing, lifetimes, error handling, and async guidance: inline unit tests, integration tests, error propagation patterns, and async patterns with tokio or async-std.
  • Tooling and workflows: recommended cargo commands (build, test, clippy, fmt, doc) and best practices for project structure.

Quick Start

Apply these Rust conventions at project start to establish consistent patterns and tooling.

Frequently Asked Questions about rust

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

FAQPage Schema
What are the standard Rust conventions for structuring tests and documentation?

Standard Rust conventions recommend inline unit tests, integration tests, module docs with //!, and item docs with /// to ensure code reliability and proper library documentation. Practical examples should accompany item documentation to clarify usage.

How do I set up cargo workflows for building, testing, and formatting Rust projects?

Cargo workflows for building, testing, and formatting Rust projects involve using standard cargo commands like build, test, clippy for linting, fmt for formatting, and doc for documentation generation. These tools streamline consistent project maintenance.

What is the best way to handle error propagation and async patterns in Rust?

Error propagation and async patterns in Rust are best handled using standard error handling conventions and async runtime libraries like tokio or async-std. Proper error propagation ensures robust libraries and maintainable async code.

When do I need to apply Rust conventions for maintainable code across multiple projects?

You need to apply Rust conventions for maintainable code at project start to establish consistent patterns, tooling guidance, and safety practices across multiple projects. Early adoption prevents technical debt and ensures team alignment.

Does this Rust tooling guidance work with both tokio and async-std for async patterns?

Yes, the Rust async guidance supports both tokio and async-std for implementing async patterns. It provides conventions for error handling and async workflows to write safe, maintainable asynchronous Rust code.