2 unstable releases
new 0.2.0 | Mar 12, 2025 |
---|---|
0.1.0 | Dec 29, 2023 |
#14 in #file-serving
143 downloads per month
Used in xitca-web
33KB
729 lines
an async static file serving crate
use http::Request;
use http_file::ServeDir;
async fn serve(req: &Request<()>) {
let dir = ServeDir::new("sample");
let res = dir.serve(&req).await;
}
Requirement
[^1]: see project Cargo.toml
for dependency versioning.
lib.rs
:
local file serving with http.
Dependencies
~3–12MB
~112K SLoC