Open LordRatte opened 2 years ago
To visualise how it works, let's take an example of the generated, intermediate code.
...
static PROJECT_DIR: Dir =
include_dir::Dir::new("",
&[include_dir::DirEntry::File(include_dir::File::new("a",
b"12345678910\n12345678910\n12345678910\n12345678910\n12345678910\n12345678910\n12345678910\n12345678910\n12345678910\n12345678910\n"))]);
fn main() {
PROJECT_DIR.extract(Path::new("./o")).unwrap();
}
Now becomes the following with the feature turned on
...
static PROJECT_DIR: Dir = include_dir::Dir::new(
"",
&[include_dir::DirEntry::File(include_dir::File::new(
"a",
b"\xcf12345678910\n\x0c\x00Y\x00",
))],
);
fn main() {
PROJECT_DIR.extract(Path::new("./o")).unwrap();
}
A suggested solution for #14