I am writing an application using Warp with Rust for a while now, and I want to pack it into a standalone executable but the warp::fs::dir seems to load it from filesystem, as the name suggests.
Is there any way to bundle the static files as a warp filter? Or is there any other framework that supports this?
Just to clarify, by "bundle" i mean something like this:
fn get_file() -> &str {
include_str!("file.html")
}
It seems like you are looking for
static_dirmacro fromstatic_dircrate.Quoting from the documentation: