~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.
50614ebf
—
Peter John 6 years ago
Merge branch 'master' into tweak/shell-expand-help-message
readme.md
CHANGED
|
@@ -78,6 +78,17 @@ Otherwise the files are listed from the file system on each call.
|
|
|
78
78
|
|
|
79
79
|
Always embed the files in the binary, even in debug mode.
|
|
80
80
|
|
|
81
|
+
### `interpolate-folder-path`
|
|
82
|
+
|
|
83
|
+
Allow environment variables to be used in the `folder` path. Example:
|
|
84
|
+
```rust
|
|
85
|
+
#[derive(RustEmbed)]
|
|
86
|
+
#[folder = "$CARGO_MANIFEST_DIR/foo"]
|
|
87
|
+
struct Asset;
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
This will pull the `foo` directory relative to your `Cargo.toml` file.
|
|
91
|
+
|
|
81
92
|
## Usage
|
|
82
93
|
|
|
83
94
|
```rust
|