1 unstable release
0.1.0 | Jun 19, 2022 |
---|
#1359 in HTTP server
114 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–27MB
~442K SLoC