http-file

Crates.iohttp-file
lib.rshttp-file
version
sourcesrc
created_at2023-12-29 03:14:20.10706+00
updated_at2025-03-12 03:49:24.222597+00
descriptionfile serving for http crate type
homepage
repositoryhttps://github.com/HFQR/xitca-web
max_upload_size
id1082934
Cargo.toml error:TOML parse error at line 18, column 1 | 18 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include`
size0
(fakeshadow)

documentation

README

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 interaction1

Footnotes

  1. see project Cargo.toml for dependency versioning.

Commit count: 1381

cargo fmt