dirmod
dirmod provides several convenience macros most useful in lib.rs, main.rs and mod.rs
to automatically declare mod statements for all the files in the directory.
Features
- Automatic *.rs and */mod.rs detection
- Customize visibility for all/specific modules
- Exclude specific modules
- Optionally generate re-exports (
pub use) statements (instead of directly exposing the module) for all/specific modules - Conditional compilation for
features/target_os/target_familybased on filename as parameters
Supported Rust versions
Since detecting the source file requires the proc_macro_span feature,
Rust Nightly is required to compile this crate.