[package]
name = "aerosocket"
version.workspace = true
authors.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
homepage.workspace = true
repository.workspace = true
documentation.workspace = true
readme.workspace = true
keywords.workspace = true
categories.workspace = true
description.workspace = true

[features]
default = ["tokio-runtime", "transport-tcp"]

# Runtime features
tokio-runtime = ["tokio", "aerosocket-core/tokio-runtime"]
async-std-runtime = ["async-std", "aerosocket-core/async-std-runtime"]

# Component features
server = ["dep:aerosocket-server"]
client = ["dep:aerosocket-client"]
transport-tcp = ["dep:aerosocket-transport-tcp"]
transport-tls = ["dep:aerosocket-transport-tls"]
wasm = ["dep:aerosocket-wasm"]

# Serialization features
serde = ["aerosocket-core/serde"]
rkyv = ["aerosocket-core/rkyv"]

# Feature combinations
full = [
    "server",
    "client", 
    "transport-tcp",
    "transport-tls",
    "wasm",
    "serde",
    "rkyv"
]

[dependencies]
aerosocket-core = { path = "../aerosocket-core", version = "0.1.0" }
aerosocket-server = { path = "../aerosocket-server", version = "0.1.0", optional = true }
aerosocket-client = { path = "../aerosocket-client", version = "0.1.0", optional = true }
aerosocket-transport-tcp = { path = "../aerosocket-transport-tcp", version = "0.1.0", optional = true }
aerosocket-transport-tls = { path = "../aerosocket-transport-tls", version = "0.1.0", optional = true }
aerosocket-wasm = { path = "../aerosocket-wasm", version = "0.1.0", optional = true }

# Optional runtime dependencies
tokio = { workspace = true, optional = true }
async-std = { version = "1.12", optional = true }

[dev-dependencies]
tokio = { workspace = true }
tokio-test = { workspace = true }
tracing-test = { workspace = true }

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
