1 unstable release

0.1.0 Jun 19, 2022

#1292 in HTTP server

Download history 105/week @ 2024-03-25 74/week @ 2024-04-01 49/week @ 2024-04-08 31/week @ 2024-04-15 65/week @ 2024-04-22 113/week @ 2024-04-29 22/week @ 2024-05-06 39/week @ 2024-05-13 36/week @ 2024-05-20 19/week @ 2024-05-27 18/week @ 2024-06-03 34/week @ 2024-06-10 32/week @ 2024-06-17 45/week @ 2024-06-24 8/week @ 2024-07-01 16/week @ 2024-07-08

104 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–26MB
~461K SLoC