yok 0.1.9

Embed the contents of a directory in your binary
docs.rs failed to build yok-0.1.9
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.

yok

Crates.io Rust license

A crate for Embed the contents of a directory in your binary at compile time.

Getting Started

cargo add yok
#[allow(warnings)]
fn main() {
    use yok::{Dir, Bytes,include_dir};
    const DATA: &[u8] = include_dir();
    let dir: Dir = DATA.into_dir();
    for entry in &dir.data {
        if entry.is_file {
            println!("{}", String::from_utf8_lossy(&entry.contents));
        } else if entry.is_dir {
            println!("{}", entry.path);
        }
    }
    dir.extract("./path");
}

Set YOK_PATH env and run or default path is cuttent dir

# linux,macos
export YOK_PATH="/home/andrew/code/gitlab/test_code/"
# windows cmd
set YOK_PATH="C:\path\to\your\directory"
# windows powershell
$env:YOK_PATH = "C:\path\to\your\directory"

cargo clean
cargo r