include-folder-macro 0.1.0

A macro crate for generating `pub mod` sentenses
Documentation
  • Coverage
  • 0%
    0 out of 2 items documented0 out of 1 items with examples
  • Size
  • Source code size: 16.57 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 283.7 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 5s Average build duration of successful builds.
  • all releases: 5s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • cubewhy

Include Folder Macro

What's this

// imagine the struct of current folder is 
// ./
// ./lib.rs
// ./example.rs
// ./example/code.rs
// ./example/code2.rs
include_folder!(".");

// This will expand to
pub mod example {
    pub mod code;
    pub mod code2;
}

Usage

  • Run cargo add include-folder-macro
  • Add include_folder!() macro to your lib.rs or main.rs