# 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 = "2024"
rust-version = "1.95"
name = "hearsay"
version = "0.1.0"
authors = ["Matthew Berger <matthewjordanberger@gmail.com>"]
build = false
exclude = ["demo"]
autolib = false
autobins = false
autoexamples = false
autotests = false
autobenches = false
description = """
A message broker and client for topic-based pub/sub messaging over TCP, built on tokio, with broker bridging, websockets, process spawning, and strongly typed enum contracts.\r
"""
homepage = "https://github.com/matthewjberger/hearsay"
readme = "README.md"
keywords = [
    "pubsub",
    "broker",
    "messaging",
    "tokio",
    "ipc",
]
categories = [
    "network-programming",
    "asynchronous",
    "wasm",
]
license = "MIT OR Apache-2.0"
repository = "https://github.com/matthewjberger/hearsay"

[package.metadata.docs.rs]
all-features = true

[features]
spawn = ["tokio/process"]
websockets = [
    "dep:tokio-tungstenite",
    "dep:futures-util",
]

[lib]
name = "hearsay"
path = "src/lib.rs"

[[example]]
name = "pingpong"
path = "examples/pingpong.rs"

[[test]]
name = "batch"
path = "tests/batch.rs"

[[test]]
name = "bridging"
path = "tests/bridging.rs"

[[test]]
name = "contract"
path = "tests/contract.rs"

[[test]]
name = "pubsub"
path = "tests/pubsub.rs"

[[test]]
name = "spawn"
path = "tests/spawn.rs"

[[test]]
name = "websocket"
path = "tests/websocket.rs"

[[bench]]
name = "messaging"
path = "benches/messaging.rs"
harness = false

[dependencies.enum2contract]
version = "0.3"

[dependencies.postcard]
version = "1.0.4"
features = ["alloc"]

[dependencies.serde]
version = "1.0"
features = ["derive"]

[dev-dependencies.criterion]
version = "0.7"
features = ["async_tokio"]

[dev-dependencies.futures-util]
version = "0.3"
features = [
    "sink",
    "std",
]
default-features = false

[dev-dependencies.tokio]
version = "1"
features = [
    "macros",
    "rt-multi-thread",
]

[dev-dependencies.tokio-tungstenite]
version = "0.26"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.futures-util]
version = "0.3"
features = [
    "sink",
    "std",
]
optional = true
default-features = false

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.serde_json]
version = "1.0"

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.socket2]
version = "0.5"
features = ["all"]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio]
version = "1"
features = [
    "io-util",
    "macros",
    "net",
    "rt",
    "sync",
    "time",
]

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.tokio-tungstenite]
version = "0.26"
optional = true

[target.'cfg(not(target_arch = "wasm32"))'.dependencies.uuid]
version = "1"
features = ["v4"]
