Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Guides Rust 1.75+ development with idiomatic patterns, Tokio or smol async runtimes, error handling, and standard toolchain.
Use this skill ↓87% 91%+4 ptsof test cases passed
Passed 21 of 23 test cases with the skill, and 20 of 23 without it.
3 of 3 safety checks passed
Not used yet
Goal: Write idiomatic, high-performance, and memory-safe Rust code following standard community practices (The Rust Way).
.clone() unless necessary. Use Arc<Mutex<T>> or RwLock<T> for shared state only when message passing (mpsc) is not viable.Result<T, E> with thiserror for libraries and anyhow for applications. Never use .unwrap() in production code; use .expect() with a context message or ? operator.tokio for general purpose apps. Use join_all for parallel execution of futures.New Type pattern to enforce validation at compile time.cargoclippy (Treat warnings as errors in CI)rustfmt#[test] and cargo test. Use mockall for mocking traits.my_crate/
├── Cargo.toml
├── src/
│ ├── main.rs # Binary entry point
│ ├── lib.rs # Library entry point
│ ├── bin/ # Additional binaries
│ ├── models/ # Data structures
│ ├── error.rs # Central error definition
│ └── utils.rs # Helper functions
└── tests/ # Integration tests
└── integration_test.rs
tokio, futuresaxum or actix-webserde, serde_jsonanyhow, thiserrorSkills that do similar work, with their benchmark result.
Next to this one in the catalogue, plus more from the same author.