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

low compilation performance when embeding large folder even though having excludes.

Open gy0801151351 opened this issue 1 year ago • 1 comments

During my test, I found the macro RustEmbed always scans the files under the excluded folders.

#[derive(RustEmbed)]
#[folder = "resources"]
#[exclude = "node_modules/*"]
struct Assets;


fn main() {
    for item in <Assets as RustEmbed>::iter() {
        println!("{item}");
    }
}

The attachment is my test project. Please verify. I wish macro RustEmbed would skip scanning the excludes folders and files under them.

hello-rust-embed.zip

gy0801151351 avatar Feb 08 '24 10:02 gy0801151351

@gy0801151351 It seems your'e right.. Would you be interested in a PR?

pyrossh avatar Feb 09 '24 05:02 pyrossh