[package]
name = "psrt"
version = "0.2.10"
edition = "2021"
authors = ["Serhij S. <div@altertech.com>"]
license = "Apache-2.0"
repository = "https://github.com/alttch/psrt"
description = "Industrial Pub-Sub server with minimal latency and MQTT-compatible logic"
readme = "README.md"
keywords = ["pubsub", "server", "client"]
autoexamples = false

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

[[example]]
name = "udp_aes"
path = "examples/udp_aes.rs"
required-features = ["crypto"]

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

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

[[bin]]
name = "psrtd"
path = "src/server.rs"
required-features = ["server"]

[[bin]]
name = "psrt-cli"
path = "src/cli.rs"
required-features = ["cli"]

[profile.dev]
overflow-checks = false

[profile.release]
strip = true
lto = true
codegen-units = 1

[dependencies]
tokio = { version = "1.48", features = ["full"] }
log = "0.4.14"
hex = "0.4.2"
nix = "0.25.0"
tokio-native-tls = "0.3.1"
openssl = "0.10"
async-channel = "1.7.1"
serde = { version =  "1.0.143", features = ["derive"] }
serde_yaml = "0.8.26"
clap = { version = "=3.0.0-beta.2", optional = true }
clap_derive = { version = "=3.0.0-beta.2", optional = true }
syslog = { version = "7.0.0", optional = true }
chrono = { version = "0.4.42", optional = true }
colored = { version = "2", optional = true }
env_logger = { version = "0.9.0", optional = true }
bcrypt = { version = "0.10.1", optional = true }
fork = { version = "0.1.18", optional = true }
bma-benchmark = { version = "0.0.20", optional = true }
byte-unit = { version = "4.0.13", optional = true }
hyper = { version = "0.14", features = ["full"], optional = true }
serde_json = { version = "1.0.68", optional = true }
base64 = { version = "0.13.0", optional = true }
hostname = { version = "0.3.1", optional = true }
term_size = { version = "0.3.2", optional = true }
prettytable-rs = { version = "0.10.0", optional = true }
num-format = { version = "0.4.0", optional = true }
getch = { version = "0.2.1", optional = true }
aes-gcm = { version = "0.9.4", optional = true }
rand = { version = "0.8.4", optional = true }
submap = { version = "0.2.3", optional = true }
mimalloc = { version = "0.1.43", optional = true }
parking_lot = { package = "parking_lot_rt", version = "0.12.1" }
async-trait = "0.1.74"
eva-sdk = { version = "0.3.75", optional = true }
once_cell = "1.18.0"
eva-common = { version = "0.3.119", features = ["services", "fips"], optional = true }

[features]
#default = ["server"]
cluster = ["server"]
cli = ["dep:bma-benchmark", "dep:byte-unit", "dep:clap", "dep:clap_derive", "dep:env_logger",
    "dep:term_size", "dep:prettytable-rs", "dep:num-format", "dep:getch", "dep:rand",
    "dep:mimalloc"]
server = ["dep:base64", "dep:bcrypt", "dep:clap", "dep:clap_derive", "dep:colored", "dep:chrono", "dep:fork",
    "dep:hostname", "dep:hyper", "dep:serde_json", "dep:syslog", "dep:mimalloc", "submap/native-digest",
    "dep:eva-common", "dep:eva-sdk"]
crypto = ["dep:aes-gcm", "dep:rand"]
openssl-vendored = ["openssl/vendored", "eva-common/openssl-no-fips"]
openssl3 = ["eva-common/openssl3"]
std-alloc = []
