Rust Module Organization
Structure your Rust projects with clean module hierarchies, proper visibility, and intuitive public APIs.
Usage
Describe your project structure and get recommendations for module organization and visibility.
Examples
- "How should I organize modules in a Rust library crate?"
- "What's the difference between mod.rs and named files?"
- "How do I create a prelude module for my crate?"
Guidelines
- Follow the Rust 2018 edition module path conventions
- Use pub(crate) for internal-only items
- Show re-export patterns for clean public APIs
- Explain when to use separate files vs inline modules
- Include conventions for lib.rs vs main.rs organization