Crate embed_file
source ·Expand description
embed-file
A simplified version of rust-embed for single files instead of folders. Embeds files content the binary in release mode, but loads it from the fs in debug.
The goal of is to avoid unnecessary recompilations when an included by e.g. include_str
file change.
Usage
let my_file_contents = embed_file::embed_string!("path/to/my_file.txt");
println!("{}", my_file_contents);
Macros
- Embeds the file contents as a string into the binary in release mode, but loads it from fs in debug.