~repos /rust-embed
git clone https://pyrossh.dev/repos/rust-embed.git
rust macro which loads files into the rust binary at compile time during release and loads the file from the fs during dev.
4ac6f5b3
—
Day Fisher 1 year ago
add docs
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
|
-
##
|
|
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`
|