Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

rust-development

БесплатноБез исполняемых скриптовНе проверен

Rust development — cargo, clippy, rustfmt, async, Tokio, Serde, memory safety. Use when mentioning Rust, cargo, ownership, lifetimes, fearless concurrency, or…

laurigatesот laurigates★ 61 звезда на GitHub11 установок в других каталогах

Об этом скилле

Rust Development

Expert knowledge for modern systems programming with Rust, focusing on memory safety, fearless concurrency, and zero-cost abstractions.

When to Use This Skill

Use this skill when... Use sibling skill instead when...
Writing Rust code, ownership, lifetimes, async/await Configuring lint rules in detail -- use clippy-advanced
Choosing crates from the ecosystem (Tokio, Serde) Detecting unused dependencies -- use cargo-machete
Designing module structure or trait hierarchies Running tests with parallel isolation -- use cargo-nextest
Learning idiomatic Rust patterns and edition features Generating coverage reports -- use cargo-llvm-cov

Core Expertise

Modern Rust Ecosystem

  • Cargo: Build system, package manager, and workspace management
  • Rustc: Compiler optimization, target management, and cross-compilation
  • Clippy: Linting for idiomatic code and performance improvements
  • Rustfmt: Consistent code formatting following Rust style guidelines
  • Rust-analyzer: Advanced IDE support with LSP integration

Language Features

  • Rust 2024 edition: RPITIT, async fn in traits, impl Trait improvements
  • Const generics and compile-time computation
  • Generic associated types (GATs)
  • Let-else patterns and if-let chains

Key Capabilities

Ownership & Memory Safety

  • Implement ownership patterns with borrowing and lifetimes
  • Design zero-copy abstractions and efficient memory layouts
  • Apply RAII patterns through Drop trait and smart pointers (Box, Rc, Arc)
  • Leverage interior mutability patterns (Cell, RefCell, Mutex, RwLock)
  • Use Pin/Unpin for self-referential structures

Async Programming & Concurrency

  • Tokio: Async runtime for high-performance network applications
  • async-std: Alternative async runtime with familiar API design
  • Futures: Composable async abstractions and stream processing
  • Rayon: Data parallelism with work-stealing thread pools
  • Design lock-free data structures with atomics and memory ordering

Error Handling & Type Safety

  • Design comprehensive error types with thiserror and anyhow
  • Implement Result<T, E> and Option patterns effectively
  • Use pattern matching for exhaustive error handling
  • Apply type-state patterns for compile-time guarantees

Performance Optimization

  • Profile with cargo-flamegraph, perf, and criterion benchmarks
  • Optimize with SIMD intrinsics and auto-vectorization
  • Implement zero-cost abstractions and inline optimizations
  • Use unsafe code judiciously with proper safety documentation

Testing & Quality Assurance

  • Unit Testing: #[test] modules with assertions
  • Integration Testing: tests/ directory for end-to-end validation
  • Criterion: Micro-benchmarking with statistical analysis
  • Miri: Undefined behavior detection in unsafe code
  • Fuzzing: cargo-fuzz for security and robustness testing

Essential Commands

# Project setup
cargo new my-project      # Binary crate
cargo new my-lib --lib    # Library crate
cargo init                # Initialize in existing directory
# From a template repo instead of an empty crate — see the cargo-generate skill
cargo generate --git <template-url> --name my-project

# Development workflow
cargo build                      # Debug build
cargo build --release           # Optimized build
cargo run                       # Build and run
cargo run --release             # Run optimized
cargo test                      # Run all tests
cargo test --lib               # Library tests only
cargo bench                     # Run benchmarks

# Code quality
cargo clippy                    # Lint code
cargo clippy -- -W clippy::pedantic  # Stricter lints
cargo fmt                       # Format code
cargo fmt --check              # Check formatting
cargo fix                       # Auto-fix warnings

# Dependencies
cargo add serde --features derive  # Add dependency
cargo update                       # Update deps
cargo audit                        # Security audit
cargo deny check                   # License/advisory check

# Advanced tools
cargo expand                    # Macro expansion
cargo flamegraph               # Profile with flame graph
cargo doc --open               # Generate and open docs
cargo miri test                # Check for UB

# Cross-compilation
rustup target add wasm32-unknown-unknown
cargo build --target wasm32-unknown-unknown

Best Practices

Idiomatic Rust Patterns

// Use iterators over manual loops
let sum: i32 = numbers.iter().filter(|x| **x > 0).sum();

// Prefer combinators for Option/Result
let value = config.get("key")
    .and_then(|v| v.parse().ok())
    .unwrap_or_default();

// Use pattern matching effectively
match result {
    Ok(value) if value > 0 => process(value),
    Ok(_) => handle_zero(),
    Err(e) => return Err(e.into()),
}

// Let-else for early returns
let Some(config) = load_config() else {
    return Err(ConfigError::NotFo
Полный SKILL.md на GitHub

Установить rust-development в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Glob
Grep
Read
Bash(cargo build *)
Bash(cargo run *)
Bash(cargo test *)
Bash(cargo bench *)
Bash(cargo clippy *)
Bash(cargo fmt *)
Bash(cargo fix *)
Bash(cargo add *)
Bash(cargo update *)
Bash(cargo audit *)
Bash(cargo deny *)
Bash(cargo new *)
Bash(cargo init *)
Bash(cargo doc *)
Edit
Write
TodoWrite
WebFetch
WebSearch

Вложенные файлы

REFERENCE.md

FAQ

Что делает скилл rust-development?

Rust development — cargo, clippy, rustfmt, async, Tokio, Serde, memory safety. Use when mentioning Rust, cargo, ownership, lifetimes, fearless concurrency, or async programming.

Как установить скилл rust-development?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл rust-development запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить rust-development с