btcli 0.5.8

An online command-line translation tool for Chinese and other languages with TUI interface.
# Enable unstable features
# NOTE: Commented out because profile-rustflags requires nightly
# cargo-features = ["profile-rustflags"]

[package]
name = "btcli"
version = "0.5.8"
edition = "2024"
license = "MPL-2.0"
authors = ["S.A. (@snoware) <2026>"]
description = "An online command-line translation tool for Chinese and other languages with TUI interface."
documentation = "https://docs.rs/btcli"
readme = "README.md"
repository = "https://gitee.com/ironbayberry/btcli"
homepage = "https://swe-iss.rth1.xyz/softwares/btcli"
keywords = ["translate", "Chinese", "TUI", "SASWE", "open-source"]
categories = ["command-line-utilities"]

[lints.rust]
unsafe_code = "forbid"

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

# 添加post_build二进制目标
[[bin]]
name = "post_build"
path = "post_build.rs"

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

[dependencies]
serde = { version = "1.0.228", features = ["derive"] }
toml = "0.9.11"
ureq = { version = "3.1.4", features = ["json"] }
serde_json = "1.0.149"
clipboard = "0.5.0"
md5 = "0.8.0"
rand = "0.9.2"
log = { version = "0.4", features = ["std"] }
chrono = "0.4"
lazy_static = "1.5"
base64 = "0.22.1"

# UI功能作为可选依赖
cursive = { version = "0.21.1", optional = true }

[features]
# 默认启用UI功能
default = ["ui"]
# UI功能包括cursive库
ui = ["dep:cursive"]

[profile.default]
inherits = "release"

[profile.release]
# 优化级别:3(性能优先)、"z"(体积优先)、"s"(平衡)
opt-level = 3

# 链接时优化:false(关闭)、"thin"(推荐)、true(全量)
lto = true

# 代码生成单元:1(单单元)、16(默认)
codegen-units = 1

# Panic处理策略:"unwind"(默认)、"abort"(性能优化)
panic = "abort"

# 符号信息剥离:true(移除调试符号)
strip = true

# 目标CPU优化 - 注释掉需要不稳定功能的配置
# rustflags = ["-C", "target-cpu=native"]

# 添加自定义脚本部分
[workspace]
members = []
# 注意:workspace.metadata.scripts 不是标准的Cargo功能,需要使用 cargo-make 或类似工具