Giter Site home page Giter Site logo

Comments (1)

pyrossh avatar pyrossh commented on June 3, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.