serdir 0.3.0

helpers for conditional GET, HEAD, byte range serving, and gzip content encoding for static files and more with hyper and tokio
Documentation
[package]
name = "serdir"
version = "0.3.0"
authors = [
    "Greg Steffensen <greg.steffensen@gmail.com>",
    "Scott Lamb <slamb@slamb.org>",
]
license = "MIT/Apache-2.0"
readme = "README.md"
description = "helpers for conditional GET, HEAD, byte range serving, and gzip content encoding for static files and more with hyper and tokio"
keywords = ["http", "file", "range", "tower", "hyper"]
categories = ["web-programming::http-server"]
repository = "https://github.com/StupendousYappi/serdir"
edition = "2021"
rust-version = "1.88"

[features]
runtime-compression = ["dep:brotli", "dep:tempfile"]
tower = ["dep:tower", "dep:http-body-util"]
hyper = ["dep:hyper"]


[package.metadata.docs.rs]
features = ["runtime-compression", "tower", "hyper"]
rustdoc-args = ["--cfg", "docsrs"]

[dependencies]
bytes = "1.11"
sieve-cache = "1.1.6"
futures-core = { version = "0.3", default-features = false, features = [
    "alloc",
] }
futures-util = { version = "0.3", default-features = false }
http = "1.4"
http-body = "1.0"
httpdate = "1.0"
pin-project-lite = "0.2"
rapidhash = "4.2"
sync_wrapper = "1.0"
tokio = { version = "1.49", features = ["rt-multi-thread"] }
brotli = { version = "7.0", optional = true }
tempfile = { version = "3.11", optional = true }
log = { version = "0.4.29", features = ["std"] }
tower = { version = "0.4", optional = true }
http-body-util = { version = "0.1", optional = true }
hyper = { version = "1.0", default-features = false, optional = true }

[target.'cfg(windows)'.dependencies]
windows-sys = { version = "0.59", features = [
    "Win32_Foundation",
    "Win32_Storage_FileSystem",
    "Win32_System_IO",
] }

[dev-dependencies]
anyhow = "1"
argh = "0.1"
criterion = { version = "0.5", features = ["async_tokio"] }
htmlescape = "0.3"
http-body-util = "0.1.0"
httparse = "1.3.4"
tempfile = "3.11"
hyper = { version = "1.0.0", features = ["http1", "server"] }
hyper-util = { version = "0.1.2", features = ["tokio", "service"] }
nix = { version = "0.29", default-features = false, features = ["dir", "fs"] }
once_cell = "1.3"
rand = "0.8"
reqwest = { version = "0.12.7", default-features = false, features = ["gzip"] }
socket2 = { version = "0.5.0" }
tokio = { version = "1.39.0", features = ["macros", "sync"] }
mime = "0.3"
pretty_assertions = { version = "1.4.1", features = ["unstable"] }
env_logger = "0.11.8"

[profile.release]
debug = true

[profile.bench]
debug = true

[[bench]]
name = "file"
harness = false
required-features = ["hyper"]

[[bench]]
name = "metadata"
harness = false

[[example]]
name = "tower_middleware"
required-features = ["runtime-compression", "tower"]

[[example]]
name = "tower_service"
required-features = ["tower", "runtime-compression"]

[[example]]
name = "hyper"
required-features = ["hyper"]

[[example]]
name = "native_apis"
required-features = ["hyper"]

[[bench]]
name = "hashing"
harness = false