Giter Club home page Giter Club logo

Comments (12)

jolhoeft avatar jolhoeft commented on July 17, 2024 1

Ah, I see. I don't think the static files handler will quite do it, using that crate or just the include_str/include_bytes macros. It basically looks to the filesystem, and data embedded in the executable doesn't show up in the filesystem.

For a small number of items some handwritten middleware wouldn't be too much trouble. An EmbeddedData might be worth creating for larger numbers. I'll ponder a bit. It might be basically StaticFilesHandler, but derive rust-embed instead of looking at the filesystem would implement the RustEmbed trait and use get to retrieve the data. Not quite sure it can be done w/o writing a procedural macro, though. I've not done that before.

from nickel.rs.

jolhoeft avatar jolhoeft commented on July 17, 2024 1

Are you no longer interested in this feature? I was hoping to work on it this weekend.

from nickel.rs.

jolhoeft avatar jolhoeft commented on July 17, 2024 1

I am jolhoeft#3868 in Discord, btw.

from nickel.rs.

jolhoeft avatar jolhoeft commented on July 17, 2024

I'm not sure I understand. Simply serving up static files should be straightforward. The static_files.rs example shows how.

from nickel.rs.

imclint21 avatar imclint21 commented on July 17, 2024

Yes but I would like to pack the assets into the compiled binary, do you understand what I mean ?

Ha this is interesting: https://github.com/pyros2097/rust-embed

from nickel.rs.

imclint21 avatar imclint21 commented on July 17, 2024

It would be great to add this feature, I think rust is very good to make portable binaries and this feature can help this ^^

from nickel.rs.

imclint21 avatar imclint21 commented on July 17, 2024

Hey @jolhoeft do you have news about it ? :D

from nickel.rs.

jolhoeft avatar jolhoeft commented on July 17, 2024

Sorry, I've been swamped by work. It's on my todo list.

from nickel.rs.

imclint21 avatar imclint21 commented on July 17, 2024

Np @jolhoeft, maybe you have Telegram or other ?

from nickel.rs.

jolhoeft avatar jolhoeft commented on July 17, 2024

I'm not on Telegram, I am on Discord and Google chat. There is also Nickel's gitter channel.

from nickel.rs.

imclint21 avatar imclint21 commented on July 17, 2024

Hmm, okey, btw Telegram is a very cool app :D

What is your discord ?

from nickel.rs.

imclint21 avatar imclint21 commented on July 17, 2024

Are you no longer interested in this feature? I was hoping to work on it this weekend.

I'm interested, I think its an important feature!

from nickel.rs.

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.