-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
104 lines (89 loc) · 3.48 KB
/
Copy pathCargo.toml
File metadata and controls
104 lines (89 loc) · 3.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
[package]
name = "app_esp32s3"
version = "0.1.0"
authors = ["Searchstars <searchstars@163.com>"]
edition = "2021"
resolver = "2"
rust-version = "1.77"
[[bin]]
name = "app_esp32s3"
harness = false # do not use the built-in cargo test harness -> resolve rust-analyzer errors
[profile.release]
opt-level = "s"
codegen-units = 1
panic = "abort"
[profile.dev]
opt-level = 1
codegen-units = 1
debug = true
[profile.dev.package.image]
opt-level = 0
codegen-units = 1
[profile.dev.package.resvg]
opt-level = 0
codegen-units = 1
[profile.release.package.image]
opt-level = 2
codegen-units = 1
[profile.release.package.resvg]
opt-level = 2
codegen-units = 1
[features]
default = ["sdcard", "repo_net", "mi_account"]
sdcard = ["esp-idf-svc/fatfs", "esp-idf-svc/sdmmc", "embedded-svc"]
repo_net = ["embedded-svc/http", "embedded-svc/utils", "csv", "serde", "serde_json", "url"]
mi_account = ["embedded-svc/http", "embedded-svc/utils", "serde", "serde_json", "md-5", "hmac", "sha1", "sha2", "base64"]
# 步骤 6:AstroBox 插件运行时。默认关闭,避免影响出货固件编译尺寸/稳定性。
# 开启后:SD 卡 `.abp` 可被列出并加载(Phase 1 为 stub runtime,不真正执行 wasm)。
plugin_runtime = ["zip", "serde", "serde_json"]
# 无屏用户的网页控制台:ESP32 内嵌 HTTPd + 编译期嵌入前端单页。
# 依赖 serde/serde_json(repo_net 或 mi_account 或 plugin_runtime 任意一个已开就有),
# 但显式开一次,保证独立使用也 OK。
webui = ["serde", "serde_json"]
experimental = ["esp-idf-svc/experimental"]
[dependencies]
log = "0.4"
anyhow = "1.0.99"
futures-lite = "2.6.1"
esp-idf-svc = { version = "0.51" }
esp32-nimble = "0.11.1"
mipidsi = "0.9.0"
display-interface-spi = "0.5.0"
cst816s = "1.0.1"
tokio = { version = "1", default-features = false, features = [
"rt",
"rt-multi-thread",
"macros",
"time",
"sync",
"io-util",
"fs",
] }
corelib = { path = "../core" }
embedded-graphics-core = "0.4"
slint = { version = "1.14.1", default-features = false, features = [
"std",
"renderer-software",
"compat-1-2"
] }
# ============ 新增:SD 卡 / HTTP / 仓库索引 / 日志 依赖 ============
embedded-svc = { version = "0.27", default-features = false, optional = true }
csv = { version = "1.3", optional = true }
serde = { version = "1", default-features = false, features = ["derive", "alloc"], optional = true }
serde_json = { version = "1", default-features = false, features = ["alloc"], optional = true }
url = { version = "2.5", optional = true }
# ============ 步骤 4:小米账号 OAuth 签名所需 ============
# md-5:密码 MD5 哈希;hmac+sha1:登录请求 _sign 签名;
# sha2:device_list 签名 HMAC-SHA256;base64:ssecurity / nonce 编码
md-5 = { version = "0.10", default-features = false, optional = true }
hmac = { version = "0.12", default-features = false, optional = true }
sha1 = { version = "0.10", default-features = false, optional = true }
sha2 = { version = "0.10", default-features = false, optional = true }
base64 = { version = "0.22", default-features = false, features = ["alloc"], optional = true }
# ============ 步骤 6:AstroBox 插件 .abp 包解包 ============
# zip:解 `.abp`(标准 ZIP)。default-features=false 仅开 deflate(纯 Rust
# miniz_oxide 后端),避开 bzip2/aes 的 C 依赖,确保 Xtensa 可交叉编译。
zip = { version = "2", default-features = false, features = ["deflate"], optional = true }
[build-dependencies]
embuild = "0.33"
slint-build = "1.14.1"