rust-embed 8.11.0

Rust Custom Derive Macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
use rust_embed::{Embed, EmbeddedFile};

#[derive(Embed)]
#[folder = "examples/public/"]
#[metadata_only = true]
struct Asset;

#[test]
fn file_is_empty() {
  let index_file: EmbeddedFile = Asset::get("index.html").expect("index.html exists");
  assert_eq!(index_file.data.len(), 0);
}