[package]
name = "meshchat"
description = "A cross platform Iced Gui application for chatting on the Meshtastic LoRa MESH via connected Bluetooth LE radios"
version = "0.1.3"
edition = "2024"
readme = "README.md"
repository = "https://github.com/andrewdavidmackenzie/meshchat"
license = "GPL-3.0"
include = ["src", "assets", "build.rs", "README.md", "LICENSE"]

[features]
default = []
debug = ["iced/debug"] # use "... --features "debug" to enable this for Iced

[dependencies]
# For communications with BLE connected radios running meshtastic firmware
meshtastic = { version = "0.1.8", default-features = false, features = ["serde", "tokio", "bluetooth-le"] }
# GUI framework
iced = { version = "0.13.1", features = ["wgpu", "tokio", "advanced", "canvas"] }
# for saving config files in platform-dependent directories
directories = { version = "6.0.0", default-features = false }
# for serialization and deserialization of config struct
serde = { version = "1.0.228", default-features = false, features = ["derive"] }
# for serialization and deserialization of Config to toml format
toml = { version = "0.9.7", default-features = false, features = ["serde", "parse", "display"] }
# For gui.send to send messages to UI from device_subscription.rs
futures = { version = "0.3.31", default-features = false }
# For receiving messages from UI in device_subscription.rs
tokio-stream = { version = "0.1.17", default-features = false }
# For receiving messages from UI in device_subscription.rs
async-stream = { version = "0.3.6", default-features = false }
# For mpsc sender/receiver and async file IO
tokio = { version = "1.47.1", default-features = false }
# For ordering messages in ChannelView
ringmap = "0.2"
# For horizontal busy bar in easing.rs
lyon_algorithms = { version = "1.0", default-features = false }
futures-channel = { version = "0.3.31", default-features = false }
chrono = { version = "0.4.42", default-features = false, features = ["clock"] }
webbrowser = { version = "1.0", default-features = false }

[build-dependencies]
iced_fontello = "0.13"

# With the standard release profile, binary size was: 10,756,272 (10.7MB)
# With these changes the binary size reduced to: 5,596,848 (5.56MB)
# After removing smol and futures_lite dependencies: 5,281,344 (5.3MB)
# After replacing once_cell in easing.rs with std lib version: 5,563,616 (5.6MB)
# After removing anyhow: 5,530,448 (5.5MB)
# Pending to try
#   - default-features = false for iced crate, currently changes theme used
#   - see if async stuff in device_subscription.rs can be done with fewer dependencies
[profile.release]
debug = false
lto = true
strip = true
opt-level = 3
codegen-units = 1
panic = "abort"
incremental = false
overflow-checks = false
