[package]
name = "maw"
version = "0.25.3"
edition = "2024"
description = "A simple and efficient web framework for Rust."
repository = "https://github.com/Srlion/maw"
license = "MIT"

[[example]]
name = "hello_world"

[[example]]
name = "middleware"

[[example]]
name = "groups"
required-features = ["middleware-logging"]

[[example]]
name = "cookie_session"
required-features = ["middleware-session"]

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

[[example]]
name = "templates"
required-features = ["minijinja"]

[[example]]
name = "redis_session"
required-features = ["middleware-session"]

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

[dependencies]
base64 = { version = "0.21.3", optional = true }
bytes = "1.11.0"
constant_time_eq = { version = "0.4.2", optional = true }
cookie = { version = "0.18.1", features = [
  "private",
  "signed",
], optional = true }
erased-serde = { version = "0.4.9", optional = true }
futures-util = { version = "0.3.31", default-features = false }
http = "1.4.0"
http-body = "1.0.1"
http-body-util = "0.1.3"
httpdate = { version = "1.0.3", optional = true }
hyper = { version = "1.8.1", features = [] }
hyper-tungstenite = { version = "0.19.0", optional = true }
hyper-util = { version = "0.1.19", features = [
  "http1",
  "server",
  "server-auto",
  "server-graceful",
] }
matchit = "0.9.1"
mime_guess = "2.0.5"
minijinja = { version = "2.15.1", features = [
  "builtins",
  "json",
  "loader",
], optional = true }
paste = "1.0.15"
pin-project-lite = { version = "0.2.16", optional = true }
postcard = { version = "1.1.3", features = ["use-std"], optional = true }
quick-xml = { version = "0.39.0", features = ["serialize"], optional = true }
rand = { version = "0.9.2", default-features = false, features = [
  "thread_rng",
], optional = true }
rust-embed = { version = "8.11.0", features = [
  "interpolate-folder-path",
], optional = true }
serde = { version = "1.0.228", features = [] }
serde_json = "1.0.149"
serde_plain = "1.0.2"
serde_urlencoded = "0.7.1"
smol_str = "0.3.5"
thiserror = "2.0.18"
tokio = { version = "1.49.0", features = ["net", "signal"] }
tokio-util = "0.7.18"
tracing = { version = "0.1.44", default-features = false, features = ["std"] }

# for examples
[dev-dependencies]
redis = { version = "1.0", features = ["tokio-comp"] }
serde = { version = "1.0.228", features = ["derive"] }
tokio = { version = "1", features = ["full"] }
tracing-subscriber = "0.3"

[features]
default = []
full = ["middleware", "minijinja", "static_files", "websocket", "xml"]
middleware = [
  "middleware-body_limit",
  "middleware-catch_panic",
  "middleware-cookie",
  "middleware-csrf",
  "middleware-logging",
  "middleware-session",
]
middleware-body_limit = []
middleware-catch_panic = ["dep:pin-project-lite"]
middleware-cookie = ["dep:base64", "dep:cookie", "dep:postcard"]
middleware-csrf = ["dep:constant_time_eq", "dep:rand", "middleware-cookie"]
middleware-logging = []
middleware-session = ["dep:rand", "middleware-cookie", "serde/derive"]
minijinja = ["dep:erased-serde", "dep:minijinja"]
static_files = ["dep:httpdate", "dep:rust-embed"]
static_files_debug_embed = ["rust-embed?/debug-embed"]
websocket = ["dep:hyper-tungstenite"]
xml = ["dep:quick-xml"]
