embeddir

Crates.ioembeddir
lib.rsembeddir
version0.1.1
sourcesrc
created_at2020-01-02 19:04:48.956726
updated_at2020-01-02 19:08:59.245016
descriptionA macro for embedding all files in a directory into the executable
homepage
repositoryhttps://github.com/PonasKovas/embeddir
max_upload_size
id194557
size6,981
Mykolas Peteraitis (PonasKovas)

documentation

README

embeddir

Crates.io

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());
	}
}
Commit count: 9

cargo fmt