use actix_web_static_files::resource_dir; use std::path::Path; fn main() { // Magic to bundle static files for actix to serve let out_dir = std::env::var("OUT_DIR").unwrap(); let out_path = Path::new(&out_dir); resource_dir("./resources/static") .with_generated_filename(out_path.join("static_files.rs")) .with_generated_fn("included_static_files") .build() .unwrap(); }