Rust Ecosystem

Structure Rust Cargo workspaces and configure clippy, rustfmt, and cargo-nextest toolchains.

71|2|Updated Feb 23, 2024
One-click install
npx skills add https://github.com/takeokunn/nixos-configuration --skill rust-ecosystem-takeokunn
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Rust Ecosystem
Source: https://github.com/takeokunn/nixos-configuration/tree/main/home-manager/programs/claude-code/skills/ecosystem/rust-ecosystem
Command: npx skills add https://github.com/takeokunn/nixos-configuration --skill rust-ecosystem-takeokunn

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill provides a structured set of Rust ecosystem patterns, guiding developers through ownership concepts, Cargo project management, toolchain configuration, and best practices for building safe, maintainable Rust code.

Core Features & Use Cases

  • Ownership and borrowing patterns, trait usage, and error handling strategies tailored for Rust.
  • Cargo workspace guidance, conventional project layout, and MSRV-compatible configurations with clippy, rustfmt, and Nextest for reliable builds.
  • Real-world scenarios include creating a library with multiple crates, enforcing consistent formatting, and setting up CI workflows to test and publish crates.

Quick Start

Use this skill to review a Rust project, propose a robust Cargo.toml, workspace layout, and toolchain settings, and generate a checklist for code reviews and CI integration.

Frequently Asked Questions about Rust Ecosystem

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

FAQPage Schema
How do I structure a Rust Cargo workspace for multiple binary and library crates?

To structure a Rust Cargo workspace, you configure a root Cargo.toml to manage multiple library and binary crates. This enforces a conventional project layout, ensuring MSRV compatibility and reliable builds across all included crates.

What's the best way to configure clippy and rustfmt for consistent Rust code formatting?

Configuring clippy and rustfmt involves enforcing conventional Cargo configurations and toolchain settings across your Rust project. This ensures consistent formatting and applies best practices for safe, maintainable code within your CI pipelines.

How do I set up a CI pipeline with cargo-nextest to test and publish Rust crates?

Setting up a CI pipeline with cargo-nextest involves configuring your Cargo workspace to enforce reliable builds. You generate a checklist for code reviews and CI integration to systematically test and publish your Rust crates.

When do I need to enforce ownership and borrowing patterns in Rust?

You enforce ownership and borrowing patterns in Rust when building safe, maintainable code. This Skill provides structured guidance on trait usage and error handling strategies tailored for Rust to solve project complexity.

Does this Rust toolchain configuration support MSRV-compatible builds?

Yes, this Rust toolchain configuration provides MSRV-compatible builds for Cargo-based workspaces. It enforces requirements for ownership, borrowing, trait usage, and error handling to ensure your library and binary crates remain stable.