~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 +11 -0
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