1 unstable release
0.1.0 | Jun 19, 2022 |
---|
#1292 in HTTP server
104 downloads per month
16KB
313 lines
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));
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