All skills
onsails avatar

/rust-dev

@1db78da
by Andrey Kuznetsovonsails/skills44 stars
3

This skill should be used when working with Rust code, reviewing Rust code, managing Rust dependencies, creating Rust projects, or fixing Rust compilation errors. It provides strict coding standards (especially FAIL FAST error handling), workspace architecture guidance, dependency management automation, and common Rust patterns.

Use this Skill: https://skilld.dev/gh/onsails/skills/rust-dev

This session only. Nothing lands on disk.

assetsworkspace-templateREADME.md

≈363 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Rust Workspace Template

This is a template for a Rust workspace following best practices.

Structure

workspace/
├── Cargo.toml          # Workspace root with shared dependencies
├── project/            # Library crate (core functionality)
│   ├── Cargo.toml      # Uses thiserror for errors
│   └── src/
│       └── lib.rs
└── project-cli/        # Binary crate (CLI interface)
    ├── Cargo.toml      # Uses anyhow for errors, clap for CLI
    └── src/
        └── main.rs

Key Features

  • Workspace dependencies: All common dependencies defined once in root Cargo.toml
  • Edition 2024: Uses the latest Rust edition
  • Separation of concerns: Library crate for logic, CLI crate for interface
  • Error handling: thiserror for library, anyhow for binary
  • CLI-first configuration: Config flows through CLI args
  • Async support: tokio runtime pre-configured
  • Logging: tracing/tracing-subscriber setup

Usage

  1. Copy this template to your project directory
  2. Rename project and project-cli to match your project name
  3. Update package names in all Cargo.toml files
  4. Update the binary name in project-cli/Cargo.toml
  5. Start building!

Building and Running

# Build the workspace
cargo build

# Run the CLI
cargo run -p project-cli

# Run tests
cargo test

# Run with verbose logging
cargo run -p project-cli -- --verbose

Source: SKILL.md on GitHub

No alerts1mo3 checks · Risk SAFE
  • Gen Agent Trust Hub1mo

    This skill provides templates, coding standards, and utility scripts for Rust development. It uses official registries for dependency information and enforces robust error-handling patterns. No security risks were identified.

  • Socket1mo

    No alerts

  • Snyk1mo

    Risk: LOW · No issues

Signed by skilld at 1db78da. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 2 days ago.

Steadyupdated last month
What it can do
Reads files Runs commands
All 3 allowed tools
ReadBash(python3 *)Bash(cargo *)

README badge

README badge for onsails/skills/rust-dev