Comments (1)
Hi @alcroito
Thank you on behalf of the amazing contributors and nice idea.
This seems to me like a counter design of what rust-embed is trying to fix. As the reason this library was created before include_dir!
was implemented was to embed assets in release only.
Another reason was certain apps could have a large set of assets in the millions (I'm looking at you node_modules) which would take the compiler a large amount of time in the dev/debug build phases if include_dir!
marco or the like was used. So during these phases we would want to load the assets from the fs. I do have an app with an assets folder of 2GB+ and 100,000+ files. rustc takes min 20 mins to compile the binary on my system (golang takes 5 mins).
But yes it would make it simpler in cases where the file count/size is small or irrelevant and wouldn't affect dev compile times and our dev/release builds would be identical in functionality. Even the go embed implementation embeds the dirs both during dev/release (which has its own set of issues again).
I think we can start this our as a new feature/api in another branch and test it out and maybe get some feedback from the users of this library about how they would feel about this api. Would you be interested in a PR for this?
from rust-embed.
Related Issues (20)
- Bump `syn` ^2 HOT 1
- The `mime-guess` feature doesn't work HOT 4
- using with askama compile time templates HOT 3
- Fix compression with interpolated env HOT 2
- Clarify MSRV policy HOT 7
- error[E0609]: no field `data` on type `Cow<'_, [u8]>` HOT 1
- Is there a way to include files based on an externally generated list HOT 6
- Rename RustEmbed trait to Embed? HOT 5
- Axum 0.7.1 - no function or associated item named `get` found for struct `Asset` in the current scope HOT 1
- Is there a way to encrypt embedded file? Maybe before/after hooks? HOT 10
- A feature analogous to debug-embed, but for WASM? HOT 2
- Debug builds more lenient when loading relative paths
- `RustEmbed` derive macro is susceptible to naming collisions HOT 2
- rust-embed is tainted with MPL-2 via option-ext HOT 1
- low compilation performance when embeding large folder even though having excludes. HOT 1
- Unable to read symbolic link in debug mode HOT 4
- Replace / expand `prefix` to allow using a generic function for rewriting paths HOT 2
- Option to not include file contents HOT 1
- Check files exist at compile time HOT 2
- RustEmbed indexing may panic error from clippy
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from rust-embed.