[package]
name = "rustelo_web"
version = "0.1.0"
edition = "2021"
description = "Rustelo Framework - Web stack umbrella port over foundation"
license = "MIT"
repository = "https://github.com/your-org/rustelo"

[features]
default = []
ssr = [
    "dep:axum",
    "dep:tower",
    "dep:tower-http",
    "dep:tokio",
    "dep:rustelo_server",
]
leptos-hydration = [
    "dep:leptos", "leptos/ssr",
    "dep:leptos_meta", "leptos_meta/ssr",
    "dep:leptos_router", "leptos_router/ssr",
    "dep:leptos_axum",
    "dep:leptos_config",
    "dep:rustelo_pages_leptos",
    "rustelo_pages_leptos?/ssr",
    "dep:rustelo_components_leptos",
    "rustelo_components_leptos?/ssr",
]
hydrate = [
    "leptos/hydrate",
    "dep:rustelo_components_leptos",
    "rustelo_components_leptos?/hydrate",
]
tls = ["dep:axum-server", "dep:rustls", "dep:rustls-pemfile"]

[dependencies]
# Foundation — routing, state, and core types (always available)
rustelo_core_lib   = { workspace = true }
rustelo_core_types = { workspace = true }

# Foundation page and component re-exports (feature-gated)
rustelo_pages_leptos      = { workspace = true, optional = true }
rustelo_components_leptos = { workspace = true, optional = true }

# Foundation server — Axum startup and SSR runner (SSR only)
rustelo_server = { workspace = true, optional = true, default-features = false }

# Leptos — optional; enabled by leptos-hydration (not needed for htmx-ssr builds)
leptos        = { workspace = true, optional = true }
leptos_meta   = { workspace = true, optional = true }
leptos_router = { workspace = true, optional = true }

# SSR-only: Axum server stack and Tokio runtime
leptos_axum   = { workspace = true, optional = true }
leptos_config = { workspace = true, optional = true }
axum          = { workspace = true, optional = true }
tower         = { workspace = true, optional = true }
tower-http    = { workspace = true, optional = true }
tokio         = { workspace = true, optional = true }

# HTTP utilities (always needed for types shared between SSR/WASM)
http  = { workspace = true }

# Serialization and utilities
serde      = { workspace = true }
serde_json = { workspace = true }
thiserror  = { workspace = true }
tracing    = { workspace = true }

# TLS (optional, implies ssr)
axum-server    = { workspace = true, optional = true }
rustls         = { workspace = true, optional = true }
rustls-pemfile = { workspace = true, optional = true }
