alpha

Sets idiomatic Rust conventions for the coding agent: ownership, error handling, naming, modules, async code, API design and a final review checklist.
description: 'Rust programming language coding conventions and best practices'
applyTo: '**/*.rs'
Follow idiomatic Rust practices and community standards when writing Rust code.
These instructions are based on [The Rust Book](https://doc.rust-lang.org/book/), [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/), [RFC 430 naming conventions](https://github.com/rust-lang/rfcs/blob/master/text/0430-finalizing-naming-conventions.md), and the broader Rust community at [users.rust-lang.org](https://users.rust-lang.org).
Result<T, E> and provide meaningful error messages.mod) and public interfaces (pub) to encapsulate logic.?, match, or if let.serde for serialization and thiserror or anyhow for custom errors.async/await and tokio or async-std.main.rs vs lib.rs) for testability and reuse.rayon for data parallelism and CPU-bound tasks.&str instead of String for function parameters when you don't need ownership.&T) over cloning unless ownership transfer is necessary.&mut T when you need to modify borrowed data.Rc<T> for single-threaded reference counting and Arc<T> for thread-safe reference counting.RefCell<T> for interior mutability in single-threaded contexts and Mutex<T> or RwLock<T> for multi-threaded contexts.unwrap() or expect() unless absolutely necessary—prefer proper error handling.Result instead.unsafe unless required and fully documented.clone(), use borrowing instead of cloning unless ownership transfer is needed.collect(), keep iterators lazy until you actually need the collection.rustfmt for automatic formatting.///.cargo clippy to catch common mistakes and enforce best practices.Result<T, E> for recoverable errors and panic! only for unrecoverable errors.? operator over unwrap() or expect() for error propagation.thiserror or implement std::error::Error.Option<T> for values that may or may not exist.Eagerly implement common traits where appropriate:
Copy, Clone, Eq, PartialEq, Ord, PartialOrd, Hash, Debug, Display, DefaultFrom, AsRef, AsMutFromIterator and ExtendSend and Sync are auto-implemented by the compiler when safe; avoid manual implementation unless using unsafe codebool parametersOption<T> appropriately for truly optional valuesDeref and DerefMutDebug#[cfg(test)] modules and #[test] annotations.mod tests { ... }).tests/ directory with descriptive filenames./// comments) following the [API Guidelines](https://rust-lang.github.io/api-guidelines/).#[doc(hidden)] to hide implementation details from public documentation.? operator, not unwrap() or deprecated try! macro.Cargo.toml.description, license, repository, keywords, categories.mod.rs or named files.main.rs or lib.rs minimal - move logic to modules.Before publishing or reviewing Rust code, ensure:
Debug, Clone, PartialEq where appropriateResult<T, E> and provides meaningful error typesunsafe code, proper error handlingcargo fmt, cargo clippy, and cargo test© GitHub, Inc. · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com


Sea turtle carrying floating film studio island
Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.
image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost
Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.
video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

Cozy Pixel Art Farm Island Village
Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.
image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape
Loading reviews…
Loading comments…