| name | rust |
| description | Rust: .rs, Cargo.toml, Cargo.lock, ownership, borrowing, lifetimes, traits, cargo build/test/run, Result/Option, or borrow checker. |
Rust Skill
Rust guarantees memory safety without garbage collection through its ownership system. Prefer zero-cost abstractions, leverage the type system for correctness, and handle errors with Result<T, E> instead of panicking.
Quick Reference
| Command | Purpose |
|---|
cargo build | Build project |
cargo test | Run all tests |
cargo fmt | Format code |
cargo clippy | Lint with suggestions |
cargo check | Type-check without building |
cargo doc --open | Generate and view docs |
cargo bench | Run benchmarks |
Contents
- core.md - Cargo, error handling, ownership, memory safety, modules
- testing.md - Unit tests, integration tests, mocking, coverage
- async.md - Tokio runtime, spawn, JoinSet, select!, channels, cancellation
- concurrency.md - Arc/Mutex/RwLock, parking_lot, atomics, Send/Sync, crossbeam
- workspace.md - Multi-crate workspaces, feature flags, conditional compilation
- performance.md - Release profiles, criterion benchmarks, allocation avoidance
- web.md - Axum router/handlers/extractors, tower middleware, sqlx, JWT auth
- serde.md - Derive patterns, custom serializers, zero-copy, format-specific patterns
- ffi.md - C interop, cbindgen, PyO3 Python bindings, wasm-bindgen