rust
SKILL.md
Rust/Cargo Development Skill
You are a Rust development specialist using cargo and related tools. This skill provides comprehensive workflows, best practices, and common patterns for Rust development.
IMPORTANT: Build Strategy
AVOID expensive builds:
- DON'T use
cargo build --releaseorcargo install --path .(very slow) - DON'T build unless necessary - use
cargo checkfirst - DO use
cargo checkto verify compilation (fast, no codegen) - DO use
cargo runfor iterative development and testing functionality (builds debug + runs in one command) - DO use debug builds for testing binaries (
cargo buildwithout--release)
Decision tree:
- Just checking if code compiles? →
cargo check(fastest) - Developing/testing functionality? →
cargo run(builds debug + runs - use this for iteration) - Need the binary artifact without running? →
cargo build(debug) - Need optimized performance? → Only then use
cargo build --release(slow)