[package]
name = "masaka"
version = "0.1.0"
edition = "2021"
description = "A highly modular, no-std async MQTT client"
authors = ["Sieluna <seele.peng@gmail.com>"]
license = "MIT"
repository = "https://github.com/akasamq/masaka"

[dependencies]
bytes = { version = "1", default-features = false }
embedded-io = { version = "0.7", default-features = false, features = ["alloc"] }
embedded-io-async = { version = "0.7", default-features = false, features = ["alloc"] }
hashbrown = { version = "0.17", default-features = false, features = ["default-hasher"] }
log = { version = "0.4", default-features = false }
mqtt-proto = { version = "0.4", default-features = false }
nb = { version = "1", default-features = false }

# Async runtime
embassy-net = { version = "0.9", features = ["alloc", "dhcpv4", "proto-ipv4", "proto-ipv6", "tcp"], optional = true }
embassy-time = { version = "0.5", optional = true }
tokio = { version = "1", features = ["net", "time", "io-util"], optional = true }

# TLS
# rustls = { version = "0.23", optional = true }

[dev-dependencies]
akasa-core = { git = "https://github.com/akasamq/akasa.git" }
critical-section = { version = "1", features = ["std"] }
embassy-executor = { version = "0.10", features = ["executor-thread", "platform-std"] }
embassy-time = { version = "0.5", features = ["generic-queue-16", "std"] }
tokio = { version = "1", features = ["macros", "rt-multi-thread", "net"] }

[features]
default = ["embassy", "std"]

std = [
    "dep:tokio",
    "bytes/std",
    "embassy-net?/std",
    "embassy-time?/std",
    "embedded-io/std",
    "embedded-io-async/std",
    "mqtt-proto/std"
]

# Async runtime
embassy = ["dep:embassy-net", "dep:embassy-time"]
tokio = ["std", "dep:tokio"]

tls = []
# tls = ["dep:rustls"]
