http-file 0.1.0

file serving for http crate type
Documentation

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

  • nightly Rust
  • http and futures for http types and async streaming interaction[^1]

[^1]: see project Cargo.toml for dependency versioning.