Rust Source Bundler
Easily bundle local Rust library files into a single file.
This can be useful when importing or generating Rust code as you can include! or include_str! on a single generated file containing all modules.
Example
You can run the program on this library's source files
cargo run --example rust_source_bundler
Usage
Given the following files:
project/src/
|- helpers/
| |- inner.rs
| |- mod.rs
|- lib.rs
|- utils.rs
// project/src/lib.rs
use helper_fn;
// project/src/utils.rs
// project/src/helpers/mod.rs
pub use *;
// project/src/helpers/inner.rs
You can use this library:
// project/build.rs to generate code on build