Files
openless/openless-all/app/src-tauri/Cargo.toml
T
TRIP 857ea6dc21 Merge pull request #839 from Open-Less/release/1.3.15
fix(updater): prepare 1.3.15-Beta.2 after repository transfer
2026-07-21 18:43:09 +08:00

177 lines
6.8 KiB
TOML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
[package]
name = "openless"
version = "1.3.15-Beta.2"
description = "OpenLess — local voice input that types where your cursor is"
authors = ["OpenLess"]
edition = "2021"
rust-version = "1.77"
[lib]
name = "openless_lib"
crate-type = ["staticlib", "cdylib", "rlib"]
[build-dependencies]
tauri-build = { version = "2", features = [] }
# Compile vendored Open-Less/qwen-asr C sources for the local ASR engine on macOS.
cc = "1.1"
[dependencies]
# 锁 ~2.11 因为 npm @tauri-apps/api 与 plugin-dialog 都已升 2.11;
# tauri build 跨 minor 一致性检查会拒绝 npm 2.11 + Rust 2.10 的组合。
# macos-private-api must live in [dependencies] so tauri_build can match tauri.conf.json
# macOSPrivateApi; tray-icon stays desktop-only in the target table below.
tauri = { version = "~2.11", features = ["macos-private-api"] }
# 锁 >=2.3.5 修复 GHSA-c9pr-q8gx-3mgp:tauri-plugin-shell `open` 端点作用域校验绕过(CRITICAL,issue #668)。
tauri-plugin-shell = "2.3.5"
tauri-plugin-dialog = "2"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
# OpenRouter ASR 把音频以标准 base64(带 padding)放进 JSON body(issue #582)。
base64 = "0.22"
sha2 = "0.10"
# issue #609 F-03:history.json 完整性校验(HMAC-SHA256),密钥存系统凭据库。
hmac = "0.12"
# issue #609 H-02:HMAC 比较走常量时间,避免计时侧信道。已在依赖树(sha2/hmac 传递),
# 提升为直接依赖零额外编译成本。
subtle = "2"
# F-03 的 HMAC 密钥首次生成用 OS CSPRNG。0.3.x 已在依赖树里,提升为直接依赖零额外编译成本。
getrandom = "0.3"
bzip2 = "0.4"
tar = "0.4"
tokio = { version = "1", features = ["full"] }
tokio-tungstenite = { version = "0.24", features = ["rustls-tls-webpki-roots"] }
futures-util = "0.3"
reqwest = { version = "0.12", default-features = false, features = ["json", "multipart", "rustls-tls", "stream", "system-proxy"] }
zip = "2"
thiserror = "1"
anyhow = "1"
log = "0.4"
env_logger = "0.11"
simplelog = "0.12"
parking_lot = "0.12"
once_cell = "1"
uuid = { version = "1", features = ["v4", "serde"] }
chrono = { version = "0.4", features = ["serde"] }
bytes = "1"
url = "2"
raw-window-handle = "0.6"
ferrous-opencc = "0.4"
# Audio capture — shared across desktop and mobile.
cpal = "0.15"
[target.'cfg(any(target_os = "android", target_os = "ios"))'.dependencies]
tauri-plugin-fs = "2.5.1"
# Desktop-only plugins, hotkey/insertion helpers, and tray-icon (not built for mobile).
[target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dependencies]
reqwest = { version = "0.12", default-features = false, features = ["native-tls"] }
tauri = { version = "~2.11", features = ["macos-private-api", "tray-icon"] }
tauri-plugin-updater = "2"
tauri-plugin-single-instance = "2"
tauri-plugin-autostart = "2"
global-hotkey = "0.6"
enigo = "0.2"
arboard = { version = "3", features = ["wayland-data-control"] }
rcgen = "^0.13"
local-ip-address = "^0.6"
rustls = { version = "^0.23", default-features = false, features = ["ring", "std", "tls12", "logging"] }
tokio-rustls = { version = "^0.26", default-features = false, features = ["ring", "tls12", "logging"] }
axum = { version = "^0.7", default-features = false, features = ["ws", "http1", "tokio", "query"] }
hyper = { version = "^1", features = ["server", "http1"] }
hyper-util = { version = "^0.1", features = ["tokio", "server-auto", "server", "http1"] }
tower = { version = "^0.5", features = ["util"] }
[target.'cfg(target_os = "macos")'.dependencies.keyring]
version = "3.6.3"
default-features = false
features = ["apple-native"]
[target.'cfg(target_os = "windows")'.dependencies.keyring]
version = "3.6.3"
default-features = false
features = ["windows-native"]
[target.'cfg(unix)'.dependencies]
# PIN persistence uses O_NOFOLLOW/O_NONBLOCK/O_CLOEXEC; macOS qwen-asr also
# uses libc::free for strings allocated by the C runtime.
libc = "0.2"
[target.'cfg(target_os = "linux")'.dependencies]
dbus = "0.9"
gtk = "0.18"
[target.'cfg(all(unix, not(target_os = "macos"), not(target_os = "android")))'.dependencies.keyring]
version = "3.6.3"
default-features = false
features = ["linux-native-sync-persistent", "crypto-rust"]
[target.'cfg(target_os = "android")'.dependencies]
jni = "0.21"
ndk-context = "0.1"
tao = "0.35"
minisign-verify = "0.2"
[target.'cfg(target_os = "macos")'.dependencies]
block2 = "0.5"
core-foundation = "0.10"
core-graphics = "0.24"
# issue #470:托盘麦克风设备变更改用 CoreAudio AudioObjectAddPropertyListener 原生通知
# (替代 10s 轮询,空闲零唤醒)。符号本就在依赖树(cpal → coreaudio-sys 0.2),提升为
# 直接依赖零额外编译成本。
coreaudio-sys = "0.2"
objc2 = { version = "0.5", features = ["exception"] }
objc2-foundation = "0.2"
objc2-app-kit = "0.2"
# 把胶囊窗口转成「非激活 NSPanel」,使其能叠在别的 app 的全屏 Space 之上。
# 普通 NSWindow 即便设了 collectionBehavior 也做不到(tauri#9556 / #11488)—— 必须是
# NSPanel。该插件做窗口 NSWindow→NSPanel subclass 转换;仅 macOS。
tauri-nspanel = { git = "https://github.com/ahkohd/tauri-nspanel", branch = "v2" }
[target.'cfg(target_os = "windows")'.dependencies]
foundry-local-sdk = { version = "=1.2.1", features = ["winml"] }
raw-window-handle = "0.6"
sherpa-onnx = { version = "1.13.2", default-features = false, features = ["static"] }
windows = { version = "0.58", features = [
"Win32_Foundation",
"Win32_Globalization",
"Win32_Graphics_Dwm",
"Win32_Graphics_Gdi",
"Win32_Media_Audio",
"Win32_Media_Audio_Endpoints",
"Win32_Storage_FileSystem",
"Win32_System_Com",
"Win32_System_Ole",
"Win32_System_Registry",
"Win32_System_Threading",
"Win32_UI_HiDpi",
"Win32_UI_Input_KeyboardAndMouse",
"Win32_UI_Shell",
"Win32_UI_TextServices",
"Win32_UI_WindowsAndMessaging",
] }
winreg = "0.52"
# 跨平台磨砂层(macOS NSVisualEffectView / Windows Mica)。
[target.'cfg(any(target_os = "macos", target_os = "windows"))'.dependencies]
window-vibrancy = "0.7"
[features]
default = ["custom-protocol"]
custom-protocol = ["tauri/custom-protocol"]
[profile.release]
# 之前没有 [profile.release] —— 发布版走 Cargo 默认(无 LTO、不 strip、
# codegen-units=16)。这个体量的 Tauri 应用(tokio-full / reqwest / axum /
# sherpa-onnx / windows crate 全家桶)开 LTO + codegen-units=1 + strip 能
# 明显减小二进制体积并提升运行速度。保留默认 panic="unwind":后台线程 panic
# 时只杀该线程、不 abort 掉常驻进程,稳健性与改动前一致。
opt-level = 3
lto = "thin"
codegen-units = 1
strip = "symbols"
# issue #801: wayland-scanner 0.31.10 still pins vulnerable quick-xml 0.39.
# This local copy backports upstream security commit d07c4f91f28b without
# pulling the breaking, unreleased wayland-rs master branch.
[patch.crates-io]
wayland-scanner = { path = "vendor/wayland-scanner" }