pub fn bundle<P: AsRef<Path>>(
dir: P,
bundle_name: &str,
) -> Result<(), ArchiveError>Expand description
Bundle a directory to be embedded in the binary. This function must be called in a build script.
The directory path must be a subdirectory of the manifest directory. The name of the bundle
must later be used as an argument to the include_fs! macro.
ยงExample
// In build.rs
include_fs::bundle("assets", "assets").unwrap();
include_fs::bundle("./static/public", "public").unwrap();
// In main.rs
static ASSETS: IncludeFs = include_fs!("assets");
static PUBLIC: IncludeFs = include_fs!("public");