include_dir_bytes

Crates.ioinclude_dir_bytes
lib.rsinclude_dir_bytes
version0.2.1
sourcesrc
created_at2017-10-19 07:02:34.518613
updated_at2017-10-25 02:20:35.888359
descriptionRead the directory recursively, and creates a `HashMap` with these contents at compile time with the file path as the key.
homepage
repositoryhttps://github.com/maueki/include_dir.rs
max_upload_size
id36167
size6,597
Masaru Ueki (maueki)

documentation

README

include_dir_bytes

Read the directory recursively, and creates a HashMap with these contents at compile time with the file path as the key.

Usage

Add this to your Cargo.toml:

[dependencies]
include_dir_bytes = "0.2"

and use it like this:

#![feature(plugin)]
#![plugin(include_dir_bytes)]

// ...

let file_map = include_dir!("path/to/dir");
Commit count: 10

cargo fmt