bacnet-cli 0.14.0

BACnet command-line tool for device discovery, reading, and writing
[package]
name = "bacnet-cli"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
license.workspace = true
repository.workspace = true
homepage.workspace = true
readme = "README.md"
description = "BACnet command-line tool for device discovery, reading, and writing"
keywords = ["bacnet", "building-automation", "cli", "hvac"]
categories = ["command-line-utilities", "network-programming"]

[[bin]]
name = "bacnet"
path = "src/main.rs"

[dependencies]
bacnet-npdu = { workspace = true }
bacnet-types = { workspace = true, features = ["std"] }
bacnet-encoding = { workspace = true, features = ["std"] }
bacnet-services = { workspace = true, features = ["std"] }
bacnet-transport = { workspace = true, features = ["ipv6"] }
bacnet-network.workspace = true
bacnet-client = { workspace = true, features = ["ipv6"] }
bytes = { workspace = true, features = ["std"] }
tracing.workspace = true
tokio = { workspace = true, features = ["net", "rt-multi-thread", "sync", "macros", "time", "signal"] }
clap = { version = "4", features = ["derive"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1"
comfy-table = "7"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }

# SC-TLS optional deps
tokio-rustls = { workspace = true, optional = true }
rustls = { workspace = true, optional = true }
rustls-pki-types = { version = "1", optional = true }
time = { version = "0.3.54", features = ["formatting"], optional = true }

# Only for the TUI: the platform config directory that holds its profiles,
# profile serialization, SC device identity generation, and the IPv4
# interfaces its interface picker lists.
directories = { version = "6.0", optional = true }
toml = { version = "1.1", optional = true }
getrandom = { workspace = true, optional = true }
if-addrs = { version = "0.15", optional = true }

# Pcap optional deps
pcap = { version = "2", optional = true }
ctrlc = { version = "3", optional = true }
libc = { version = "0.2", optional = true }
owo-colors = "4.3.0"

# Terminal UI (`bacnet tui`). ratatui without its calendar widget (which pulls
# in the `time` crate), macros, or `underline-color`, whose weak references to
# the other backends would lock about 60 crates that are never built.
# crossterm is the version ratatui re-exports; it is named here only to turn
# on `event-stream`, and the code imports it as `ratatui::crossterm`.
ratatui = { version = "0.30.2", optional = true, default-features = false, features = ["crossterm", "layout-cache"] }
crossterm = { version = "0.29", optional = true, features = ["event-stream"] }
futures-util = { workspace = true, optional = true }
# The capture screen's decode tree (#971).
tui-tree-widget = { version = "0.24.1", optional = true }
# Grapheme clusters for wrapping property values; ratatui already locks it.
unicode-segmentation = { version = "1.13", optional = true }

[dev-dependencies]
tempfile = "3"
bacnet-objects.workspace = true
bacnet-server.workspace = true
rcgen.workspace = true
futures-util.workspace = true
insta = "1.48"
# The scripted MS/TP ring the monitor screen's tests play (#970).
bacnet-transport = { workspace = true, features = ["test-support"] }
tokio = { workspace = true, features = ["test-util"] }

# The MS/TP one-shot test's pseudo-terminal pair (#969).
[target.'cfg(target_os = "linux")'.dev-dependencies]
tokio-serial = "5"

# The pseudo-terminal that plain `bacnet` opens the TUI on (#974).
[target.'cfg(unix)'.dev-dependencies]
nix = { workspace = true, features = ["term"] }

[features]
default = ["tui"]
# The full-screen terminal UI: `bacnet tui`, and plain `bacnet` on a terminal
# (#974). On by default since 0.14.0; `--no-default-features` builds the
# one-shot commands without it (and without ratatui and crossterm).
tui = [
    "dep:ratatui",
    "dep:crossterm",
    "dep:futures-util",
    "dep:unicode-segmentation",
    "dep:toml",
    "dep:getrandom",
    "dep:directories",
    "dep:if-addrs",
    "dep:tui-tree-widget",
]
sc-tls = [
    "bacnet-client/sc-tls",
    "bacnet-transport/sc-tls",
    "dep:tokio-rustls",
    "dep:rustls",
    "dep:rustls-pki-types",
    "dep:time",
]
pcap = ["dep:pcap", "dep:ctrlc", "dep:libc"]
# MS/TP over a serial port (`--mstp`, `mstp-ports`). Released in the Linux
# CLI; built and tested on macOS and Windows as experimental (#969).
serial = ["bacnet-transport/serial"]

[lints]
workspace = true