Rust Conventions

Enforce idiomatic Rust conventions across a Cargo workspace.

Updated Feb 13, 2026
One-click install
npx skills add https://github.com/FrancisVarga/stupid-db --skill rust-conventions-francisvarga
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Rust Conventions
Source: https://github.com/FrancisVarga/stupid-db/tree/main/.claude/skills/rust-conventions
Command: npx skills add https://github.com/FrancisVarga/stupid-db --skill rust-conventions-francisvarga

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill enforces consistent and idiomatic Rust coding practices across the stupid-db project, improving code quality, maintainability, and developer collaboration.

Core Features & Use Cases

  • Cargo Workspace Management: Defines a standardized structure for managing multiple Rust crates.
  • Error Handling Patterns: Promotes the use of thiserror for libraries and anyhow for binaries.
  • Logging Standards: Mandates the use of the tracing crate for all logging.
  • Async Best Practices: Guides on using tokio for I/O and rayon for CPU-bound tasks.
  • Trait Design: Recommends async methods for pluggable components.
  • Testing Conventions: Outlines clear strategies for writing effective unit and integration tests.
  • Module Organization: Provides a clear directory structure for crates.

Quick Start

Apply the Rust Conventions skill to ensure all new Rust code adheres to the project's established patterns.

Frequently Asked Questions about Rust Conventions

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

FAQPage Schema
What's the best way to standardize Rust error handling in a Cargo workspace?

Standardizing Rust async patterns means using `tokio` for I/O-bound tasks and `rayon` for CPU-bound operations. This separation maximizes throughput for network operations while efficiently utilizing multiple cores for heavy computations.

How do I structure modules and crates in a Rust Cargo workspace?

Structuring a Rust Cargo workspace requires organizing multiple crates with a clear directory layout and standardized module organization. This approach centralizes dependencies and enforces consistent coding conventions across all workspace components.

Does this Rust convention skill mandate using the tracing crate for logging?

Yes, the Rust conventions mandate using the `tracing` crate for all logging. This standard replaces traditional logging macros with structured, event-based logging, providing better observability and diagnostics across asynchronous Rust applications.

When should I use async methods for trait design in Rust?

Async methods for trait design in Rust should be used when building pluggable components. This convention allows traits to define asynchronous interfaces, enabling flexible implementations that integrate seamlessly with `tokio`-based async runtimes.