[package]
name = "puniyu_types"
version = "0.7.4"
description = "puniyu 通用类型库"
authors.workspace = true
license.workspace = true
readme.workspace = true
homepage.workspace = true
repository.workspace = true
edition.workspace = true
rust-version.workspace = true

[dependencies]
chrono = { workspace = true, optional = true }
puniyu_logger = { workspace = true, optional = true }
serde = { workspace = true, optional = true }
serde_json = { workspace = true, optional = true }
bytes = { workspace = true, optional = true }
strum = { workspace = true, optional = true }
toml = { workspace = true, optional = true }
thiserror = { workspace = true, optional = true }
reqwest = { workspace = true, optional = true }
async-trait = { workspace = true, optional = true }
actix-web = { workspace = true, optional = true }
flume = { workspace = true, optional = true }
puniyu_config = { version = "0.7.4", path = "../puniyu_config", optional = true }
derive_builder = { workspace = true, optional = true }
tokio = { workspace = true, optional = true }

[dev-dependencies]
tokio = { workspace = true, features = ["full"] }
async-trait = { workspace = true }
chrono = { workspace = true }

[features]
default = ["full"]
adapter = [
    "dep:chrono",
    "dep:thiserror",
    "dep:reqwest",
    "dep:async-trait",
    "dep:puniyu_logger",
    "dep:derive_builder",
    "dep:bytes",
    "version",
    "contact",
    "sender",
    "element",
    "config",
]
event = ["dep:strum", "dep:puniyu_config", "dep:bytes", "bot", "element", "sender", "contact"]
context = ["dep:bytes", "adapter", "bot", "element", "event", "contact", "sender"]
account = ["dep:serde"]
contact = ["dep:serde", "dep:strum"]
bot = ["adapter", "account"]
sender = ["dep:serde", "dep:strum"]
element = ["dep:serde", "dep:strum", "dep:serde_json", "dep:bytes"]
server = ["dep:actix-web", "dep:flume"]
task = ["dep:async-trait"]
command = ["dep:async-trait", "context", "event"]
plugin = ["dep:async-trait", "version", "task", "command", "server", "config"]
handler = ["dep:async-trait", "event"]
version = ["dep:serde"]
config = ["dep:toml"]
bus = ["dep:tokio", "dep:puniyu_logger", "event"]
full = [
    "adapter",
    "event",
    "context",
    "account",
    "contact",
    "bot",
    "sender",
    "element",
    "server",
    "task",
    "command",
    "plugin",
    "handler",
    "version",
    "config",
    "bus",
]

[package.metadata.workspaces]
independent = true
