rust-embed icon indicating copy to clipboard operation
rust-embed copied to clipboard

Check files exist at compile time

Open sidalit opened this issue 1 year ago • 2 comments
trafficstars

Hello

First thanks for your work!

I was wondering if there is a way to check that single files exist at compile time. The folder is checked correctly however not files. I tried using #[include = "file"] to add 2 files but these files are not checked if present at compile time.

#[derive(Debug, RustEmbed)]
#[folder = "folder/config/"]
#[include = "file1"]
#[include = "file2"]

Thanks

sidalit avatar Apr 11 '24 23:04 sidalit

Maybe this needs a check. Would you be interested in a PR?

pyrossh avatar Apr 19 '24 08:04 pyrossh

I am not that proficient in rust but I can try.

How would you see the feature?

Have a directive #[files = ["folder/file1", "folder/file2] ? or do you have something else in mind?

sidalit avatar Apr 22 '24 12:04 sidalit