# THIS FILE IS AUTOMATICALLY GENERATED BY CARGO
#
# When uploading crates to the registry Cargo will automatically
# "normalize" Cargo.toml files for maximal compatibility
# with all versions of Cargo and also rewrite `path` dependencies
# to registry (e.g., crates.io) dependencies.
#
# If you are reading this file be aware that the original Cargo.toml
# will likely look very different (and much more reasonable).
# See Cargo.toml.orig for the original contents.

[package]
edition = "2021"
rust-version = "1.85"
name = "mqtt5-wasm"
version = "0.3.0"
authors = ["fabriciobracht <fabricio@bracht.dev>"]
build = false
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = "MQTT v5.0 WebAssembly client and broker for browser environments"
documentation = "https://docs.rs/mqtt5-wasm"
readme = "README.md"
keywords = [
    "mqtt",
    "wasm",
    "webassembly",
    "iot",
    "pubsub",
]
categories = [
    "wasm",
    "network-programming",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/LabOverWire/mqtt-lib"

[features]
broker = [
    "client",
    "dep:mqtt5",
    "dep:tokio",
]
client = [
    "dep:wasm-bindgen",
    "dep:wasm-bindgen-futures",
    "dep:web-sys",
    "dep:js-sys",
]
default = ["client"]

[lib]
name = "mqtt5_wasm"
crate-type = [
    "cdylib",
    "rlib",
]
path = "src/lib.rs"

[dependencies.bytes]
version = "1.10"

[dependencies.console_error_panic_hook]
version = "0.1"

[dependencies.futures]
version = "0.3"

[dependencies.futures-util]
version = "0.3"

[dependencies.getrandom]
version = "0.3"
features = ["wasm_js"]

[dependencies.gloo-timers]
version = "0.3.0"
features = ["futures"]

[dependencies.js-sys]
version = "0.3"
optional = true

[dependencies.mqtt5]
version = "0.12"
features = ["tokio"]
optional = true
default-features = false

[dependencies.mqtt5-protocol]
version = "0.3"

[dependencies.tokio]
version = "1.47"
optional = true

[dependencies.tracing]
version = "0.1.41"

[dependencies.wasm-bindgen]
version = "0.2"
optional = true

[dependencies.wasm-bindgen-futures]
version = "0.4"
optional = true

[dependencies.web-sys]
version = "0.3"
features = [
    "BinaryType",
    "Blob",
    "BroadcastChannel",
    "CloseEvent",
    "ErrorEvent",
    "Event",
    "EventTarget",
    "ExtendableMessageEvent",
    "MessageChannel",
    "MessageEvent",
    "MessagePort",
    "ServiceWorkerGlobalScope",
    "WebSocket",
    "Window",
    "console",
]
optional = true

[target.wasm32-unknown-unknown.dependencies.tokio]
version = "1.47"
features = [
    "sync",
    "macros",
    "io-util",
    "time",
    "rt",
]
optional = true
