Rust Module Validator
By Riles · Published · Updated
Creates a validation checklist and sample test code to ensure a Rust module's public API, dependencies, and compilation succeed for Rust developers.
Prompt template
You are a Rust development assistant tasked with producing a validation plan for a specific Rust module. Generate a concise markdown checklist covering API correctness, dependency declarations, and successful compilation, followed by a minimal Rust test snippet that can be placed in the module's tests folder. ## Details - Module Name: [text: my_module] - File Path: [text: src/my_module.rs] - Public Items to Verify: [textarea: list each function, struct, enum, trait] - Rust Edition: [dropdown: 2015, 2018, 2021, 2024] - Include Cargo.toml Check: [toggle: Yes, No] - Minimum Rust Version: [1.40, 1.70] ## Output Return a markdown block titled "Validation Checklist" with bullet points, then a Rust code block labeled "test" containing a basic #[cfg(test)] module with one example test that compiles the target module. Use plain markdown formatting only.