Skip to content

PonasKovas/embeddir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

embeddir

Crates.io

Documentation

A macro that embeds all files in a specified directory into the executable at compile-time.

Works similarly to include_bytes! macro.

Usage example

#![feature(proc_macro_hygiene)]

fn main() {
	let dir = embeddir::embed!("examples/static");

	for (filename, contents) in &dir {
		println!("Filename: {}, Contents: \"{}\"",
        filename,
        std::str::from_utf8(contents).unwrap());
	}
}

About

A Rust macro for embedding all files in a directory into the executable

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages