[package]
name = "maw"
version = "0.17.0"
edition = "2024"
description = "A simple and efficient web framework for Rust."
license = "MIT"
repository = "https://github.com/Srlion/maw"
authors = ["Srlion <srlion32@gmail.com>"]

[features]
default = []

xml = ["dep:quick-xml"]
minijinja = ["dep:minijinja", "dep:erased-serde"]

middleware-cookie = ["dep:cookie"]
middleware-session = ["middleware-cookie", "serde/derive"]
middleware-logging = []
middleware-csrf = ["middleware-cookie", "dep:rand", "dep:constant_time_eq"]
middleware-catch_panic = ["dep:pin-project-lite"]
middleware-body_limit = []

middleware = [
    "middleware-cookie",
    "middleware-session",
    "middleware-logging",
    "middleware-csrf",
    "middleware-catch_panic",
    "middleware-body_limit",
]

full = ["xml", "minijinja", "middleware"]

[dependencies]
matchit = "0.9"
mime_guess = "2"
smol_str = "0.3"
serde_urlencoded = "0.7"
http-body-util = "0.1"
tracing = "0.1"
bytes = "1"
thiserror = "2"
tokio = { version = "1", features = ["signal", "net"] }
http = "1"
serde = { version = "1", features = [] }
hyper = { version = "1", features = [] }
hyper-util = { version = "0.1", features = [
    "server",
    "server-graceful",
    "http1",
] }
paste = "1"
minijinja = { version = "2", optional = true, features = [
    "loader",
    "builtins",
    "json",
] }
serde_json = "1"
quick-xml = { version = "0.38", features = ["serialize"], optional = true }
erased-serde = { version = "0.4", optional = true }
cookie = { version = "0.18", features = ["private", "signed"], optional = true }
futures-core = "0.3.31"
http-body = "1.0.1"
tokio-util = "0.7.17"
rand = { version = "0.9.2", optional = true, default-features = false, features = [
    "thread_rng",
] }
constant_time_eq = { version = "0.4.2", optional = true }
pin-project-lite = { version = "0.2.16", optional = true }
