-
Notifications
You must be signed in to change notification settings - Fork 84
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature Request: #[exclude = "example/some_big_directory"]
#96
Comments
@NfNitLoop I'm glad rust-embed is useful to you. Yes the exclude folder would be needed in this case. Ignoring folders in .gitignore might be harder to implement for now. #[derive(RustEmbed)]
#[folder = "examples/", exclude = "big_dir"] |
I think having the ability to exclude multiple folders would be enough for the moment. Having rust-embed follow .gitignore would probably cause more harm than good, since most projects git ignore the output of module bundlers like webpack but need those folders for the Rust code to work. |
In order to exclude multiple folders, it may need to look like this: #[derive(RustEmbed)]
#[folder = "examples/", exclude("big_dir1", "big_dir2")] |
If excluding folders gets allowed, what about individual (big) files, and what about globs? 🤔 |
I'm looking for something that's mostly similar, but I have need for something more granular. Basically there are two issues for us:
In our case it would be really useful if:
.. and The upside of being able to specify an external manifest file, rather than adding the entries to the source code, is that build systems can generate these lists as appropriate for the platform it is building on. Also, I'd like to voice some concerns about using |
This is implemented and released in v6.1.0. Thanks to @mbme. |
I was just about to open a bug about how slow rust-embed was performing in release mode...
... then I found that I was accidentally embedding a 70Mb+
node_modules
directory. Oops. (Still, it did seem rather slow for a mere 70MB but maybe that's because it's a lot of small files?)It would be nice if I could embed some directory, but exclude some large subdirectories from that embed. Ex:
Or, you could make it respect .gitignores? I already had that
node_modules
directory ignored, which is part of the reason I'd forgotten about it.Otherwise, thanks for a great crate!
The text was updated successfully, but these errors were encountered: