rust-embed
rust-embed copied to clipboard
Fix compression with interpolated env
I generated some header files to $OUT_DIR/include and I want to embed them with compression because the nature of source code (at least human readable text) very much suits dictionary compression. But it seems like starting from 6.8.1 I cannot reference $OUT_DIR/include anymore.
I wonder what is blocking this usage and are there any alternatives? (Besides from compressing it manually using tar and bzip2 and use Lazy to deflate them in runtime)
Also affected by this:
error: proc-macro derive panicked
--> src/server.rs:22:10
|
22 | #[derive(RustEmbed)]
| ^^^^^^^^^
|
= help: message: `folder` must be a relative path under `compression` feature.
Using:
#[derive(RustEmbed)]
#[folder = "$CARGO_MANIFEST_DIR/target/assets"]
struct Assets;
Reverted to relative paths, I think I had to use interpolation because of my cross builds, but I'll revisit them, hopefully this is no longer an issue.