[package]
authors = ["Guilhem Ané (@Cielbird)", "Nathaniel Simard (@nathanielsimard)"]
description = "Abstractions for network communication for Burn"
edition.workspace = true
license.workspace = true
name = "burn-communication"
readme.workspace = true
repository = "https://github.com/tracel-ai/burn/tree/main/crates/burn-communication"
version.workspace = true

[lints]
workspace = true

[features]
tracing = [
    "burn-std/tracing",
    "burn-tensor?/tracing",
]

data-service = ["burn-tensor"]
websocket = ["axum", "tokio-tungstenite", "futures"]

[dependencies]
burn-std = { path = "../burn-std", version = "=0.21.0-pre.2", default-features = true }
bytes = { workspace = true }
derive-new = { workspace = true }
futures-util = { workspace = true }
log = { workspace = true }
rmp-serde = { workspace = true }
serde = { workspace = true, features = ["derive"] }
serde_bytes = { workspace = true }
tokio = { workspace = true, features = ["rt-multi-thread", "sync", "signal", "tracing"] }
tokio-util = { workspace = true }
tracing = { workspace = true, features = ["default"] }
tracing-core = { workspace = true, features = ["default"] }
tracing-subscriber = { workspace = true, features = ["default", "fmt", "env-filter"] }

# Tensor Data Service
burn-tensor = { path = "../burn-tensor", version = "=0.21.0-pre.2", optional = true }

# Websocket
axum = { workspace = true, features = ["ws"], optional = true }
tokio-tungstenite = { workspace = true, optional = true }
futures = { workspace = true, optional = true }
