- 发布脚本:附件打包为 <binary>.7z(-mx=9)+ .7z.sha256 上传; 同时保留裸二进制附件,v1.0.3 及更早客户端(不认识 7z)仍可升级 - update.rs:pick_assets 优先选 7z、无则回退裸二进制; 下载 → 大小对账 + sha256 校验 → sevenz-rust 解压出二进制暂存 (压缩包随即删除);暂存目录清理排除 .7z - UpdateInfo 增加 asset_name 字段区分压缩包/裸文件 - 实测 21.3MB exe → 5.8MB(7-Zip -mx=9)
72 lines
2.3 KiB
TOML
72 lines
2.3 KiB
TOML
[package]
|
|
name = "mqttx-desktop"
|
|
version = "1.0.4"
|
|
edition.workspace = true
|
|
description = "MQTT X —— 基于 GPUI 的跨平台 MQTT 调试客户端"
|
|
default-run = "mqttx"
|
|
|
|
[[bin]]
|
|
name = "mqttx"
|
|
path = "src/main.rs"
|
|
|
|
[dependencies]
|
|
gpui-kit = "0.6"
|
|
|
|
anyhow = "1"
|
|
serde = { version = "1", features = ["derive"] }
|
|
serde_json = "1"
|
|
# MQTT 引擎运行在独立的 tokio runtime 线程上
|
|
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "net", "time", "io-util"] }
|
|
# GPUI 侧与引擎线程通信使用 smol 通道(GPUI 执行器兼容)
|
|
smol = "2"
|
|
|
|
rumqttc = { package = "rumqttc-v5-next", version = "0.34", features = ["websocket"] }
|
|
rumqttc-v4 = { package = "rumqttc-v4-next", version = "0.34", features = ["websocket"] }
|
|
|
|
uuid = { version = "1", features = ["v4"] }
|
|
chrono = { version = "0.4", features = ["clock"] }
|
|
dirs = "6"
|
|
|
|
# 阿里云 MQTT 签名: HMAC-SHA1 -> Base64
|
|
hmac = "0.12"
|
|
sha1 = "0.10"
|
|
base64 = "0.22"
|
|
|
|
# 自定义 TLS(自定义 CA / 双向认证 / 跳过校验),版本与 rumqttc 内部使用的 rustls 一致
|
|
rustls = { version = "0.23", default-features = false, features = ["std", "tls12", "aws_lc_rs"] }
|
|
# 加载系统根证书,作为自定义 CA 的补充
|
|
rustls-native-certs = "0.8"
|
|
|
|
# 原生文件对话框(连接导入/导出);Windows 走内建 COM 后端,Linux 用默认 xdg-portal
|
|
rfd = "0.17"
|
|
|
|
# OTA 自更新:Gitea Release 检查/下载(ureq 用 rustls,与 rumqttc 依赖同源)
|
|
ureq = { version = "2", features = ["json"] }
|
|
sha2 = "0.10"
|
|
# Release 附件为 7z 压缩包,纯 Rust 解压(客户端免装 7-Zip)
|
|
sevenz-rust = "0.6"
|
|
|
|
# 错误上报(自建 Sentry):panic 捕获 + 持久化错误;rustls 传输避免 openssl 依赖
|
|
sentry = { version = "0.49", default-features = false, features = [
|
|
"backtrace",
|
|
"contexts",
|
|
"panic",
|
|
"reqwest",
|
|
"rustls",
|
|
] }
|
|
|
|
# 窗口置顶(raw HWND + SetWindowPos)与进程资源采样
|
|
raw-window-handle = "0.6"
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
windows = { version = "0.58", features = [
|
|
"Win32_Foundation",
|
|
"Win32_System_Threading",
|
|
"Win32_System_ProcessStatus",
|
|
"Win32_System_Diagnostics_ToolHelp",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
|
|
# 嵌入窗口图标(gpui 从 exe 资源 ID 1 加载,缺失则任务栏显示默认图标)
|
|
[target.'cfg(target_os = "windows")'.build-dependencies]
|
|
embed-resource = "3"
|