ullun-api 0.3.2

Express.js-inspired web framework for Rust - simple, fast, batteries-included
Documentation
[package]
name = "ullun-api"
version = "0.3.2"
edition = "2021"
authors = ["yedoma-labs"]
description = "Express.js-inspired web framework for Rust - simple, fast, batteries-included"
license = "MIT OR Apache-2.0"
repository = "https://github.com/yedoma-labs/ullun-api"
homepage = "https://github.com/yedoma-labs/ullun-api"
documentation = "https://docs.rs/ullun-api"
readme = "README.md"
keywords = ["web", "framework", "api", "microservices", "http"]
categories = ["web-programming::http-server"]
exclude = [
    ".github/*",
    ".dockerignore",
    ".githooks/*",
    "release-plz.toml",
    "Dockerfile",
    "target/*",
]

[features]
default = []
# HS256 JSON Web Tokens and a bearer-auth middleware
jwt = ["dep:hmac", "dep:sha2", "dep:base64"]
# gzip response compression middleware
compression = ["dep:flate2"]
# WebSocket upgrades (App::ws)
websocket = ["dep:tokio-tungstenite", "dep:futures-util"]
full = ["jwt", "compression", "websocket"]

[package.metadata.docs.rs]
all-features = true

[dependencies]
# Core HTTP
http = "1.5"
hyper = { version = "1.12", features = ["full"] }
hyper-util = { version = "0.1.21", features = ["tokio"] }
http-body-util = "0.1.5"
tokio = { version = "1.54", features = ["full"] }

# Serialization
serde = { version = "1.0.229", features = ["derive"] }
serde_json = "1.0.154"

# Routing
matchit = "0.9.2"

# Async traits
async-trait = "0.1.92"

# HTTP types
bytes = "1.12"
urlencoding = "2.1.3"
serde_urlencoded = "0.7.1"
getrandom = "0.4"

# Optional (see [features])
hmac = { version = "0.13", optional = true }
sha2 = { version = "0.11", optional = true }
base64 = { version = "0.23", optional = true }
flate2 = { version = "1.1", optional = true }
tokio-tungstenite = { version = "0.30", default-features = false, features = ["handshake"], optional = true }
futures-util = { version = "0.3", default-features = false, features = ["sink"], optional = true }

[dev-dependencies]
tokio-tungstenite = { version = "0.30", features = ["connect"] }
futures-util = "0.3"
# password hashing for the taskboard example
argon2 = "0.6"
criterion = { version = "0.8", features = ["async_tokio"] }
chrono = { version = "0.4.45", default-features = false, features = ["clock"] }

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

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

[lib]
name = "ullun"
path = "src/lib.rs"

[[example]]
name = "hello_world"
path = "examples/hello_world.rs"

[[example]]
name = "full_api"
path = "examples/full_api.rs"

[[example]]
name = "todo_api"
path = "examples/todo_api.rs"

[[example]]
name = "jwt_auth"
path = "examples/jwt_auth.rs"
required-features = ["jwt"]

[[example]]
name = "realtime_chat"
path = "examples/realtime_chat.rs"
required-features = ["websocket"]

[[example]]
name = "templates_site"
path = "examples/templates_site.rs"
required-features = ["compression"]

[[example]]
name = "taskboard"
path = "examples/taskboard/main.rs"
required-features = ["jwt"]