~repos /rust-embed

#rust#proc-macro#http

git clone https://pyrossh.dev/repos/rust-embed.git
Discussions: https://groups.google.com/g/rust-embed-devs

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


Files changed (1) hide show
  1. readme.md +7 -1
readme.md CHANGED
@@ -75,12 +75,18 @@ If the feature `debug-embed` is enabled or the binary compiled in release mode a
75
75
 
76
76
  Otherwise the files are listed from the file system on each call.
77
77
 
78
+ ## Attributes
78
- ## The `prefix` attribute
79
+ ### `prefix`
79
80
 
80
81
  You can add `#[prefix = "my_prefix/"]` to the `RustEmbed` struct to add a prefix
81
82
  to all of the file paths. This prefix will be required on `get` calls, and will
82
83
  be included in the file paths returned by `iter`.
83
84
 
85
+ ### `metadata_only`
86
+
87
+ You can add `#[metadata_only = true]` to the `RustEmbed` struct to exclude file contents from the
88
+ binary. Only file paths and metadata will be embedded.
89
+
84
90
  ## Features
85
91
 
86
92
  ### `debug-embed`