1 unstable release

0.1.0 Jun 19, 2022

#1359 in HTTP server

Download history 22/week @ 2024-07-20 39/week @ 2024-07-27 3/week @ 2024-08-03 23/week @ 2024-08-10 52/week @ 2024-08-17 109/week @ 2024-08-24 89/week @ 2024-08-31 78/week @ 2024-09-07 87/week @ 2024-09-14 30/week @ 2024-09-21 12/week @ 2024-09-28 59/week @ 2024-10-05 50/week @ 2024-10-12 28/week @ 2024-10-19 13/week @ 2024-10-26 12/week @ 2024-11-02

114 downloads per month

MIT license

16KB
313 lines

actix-embed

GitHub Build Crates.io Docs.rs

Serve embedded file with actix.

use actix_web::App;
use actix_embed::Embed;
use rust_embed::RustEmbed;

#[derive(RustEmbed)]
#[folder = "testdata/"]
struct Assets;

let app = App::new()
    .service(Embed::new("/static", &Assets));

lib.rs:

actix-embed

Serve embedded file with actix.

use actix_web::App;
use actix_embed::Embed;
use rust_embed::RustEmbed;

#[derive(RustEmbed)]
#[folder = "testdata/"]
struct Assets;

let app = App::new()
    .service(Embed::new("/static", &Assets));

Dependencies

~16–27MB
~442K SLoC