rust-embed v8.11.0

#rust#proc-macro#http

git clone https://git.pyrossh.dev/rust-embed

rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.


5926e65pyrossh 2026-05-23T21:06:49+05:30
Fix embedded data being duplicated in binary ([email protected])
Files changed (1) hide show
  1. impl/src/lib.rs +1 -1
impl/src/lib.rs CHANGED
@@ -80,7 +80,7 @@ fn embedded(
80
80
  pub fn get(file_path: &str) -> ::std::option::Option<#crate_path::EmbeddedFile> {
81
81
  #handle_prefix
82
82
  let key = file_path.replace("\\", "/");
83
- const ENTRIES: &'static [(&'static str, #value_type)] = &[
83
+ static ENTRIES: &'static [(&'static str, #value_type)] = &[
84
84
  #(#match_values)*];
85
85
  let position = ENTRIES.binary_search_by_key(&key.as_str(), |entry| entry.0);
86
86
  position.ok().map(#get_value)