Repository navigation
Expand file tree
/
Copy pathCargo.toml
More file actions
69 lines (61 loc) · 3 KB
/
Copy pathCargo.toml
File metadata and controls
69 lines (61 loc) · 3 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
# Cargo.toml: [workspace] [package] [dependencies] [profile.release]
[workspace]
# 注意:yumi-ebpf 是 bpfel-unknown-none 的 no_std 探针,无法用带 std 的目标(如
# aarch64-linux-android 或 Windows host)编译/检查,故从根 workspace 摘除,
# 作为独立 workspace 由 build.rs 用 `-Z build-std` 单独构建。勿把它加回 members。
members = ["xtask"]
[package]
name = "chiri"
version = "2.0.2"
edition = "2024"
authors = ["yuki <loyeturz@163.com>"]
license = "GPL-3.0-or-later"
description = "A powerful Android system daemon for monitoring and scheduling."
repository = "https://github.com/imacte/YukiCtrl"
keywords = ["android", "scheduler", "monitor"]
categories = ["command-line-utilities", "os::linux-apis"]
[dependencies]
# --- 通用/核心 ---
serde = { version = "1.0", features = ["derive"] }
serde_yaml = "0.9"
anyhow = "1.0"
libc = "0.2"
# features = ["std"] 为 set_boxed_logger 所需(自写 log::Log 实现用它注册)
log = { version = "0.4", features = ["std"] }
# 构建期整目录嵌入(module/config):新增/删除 yaml 无需改 .rs,见 common.rs [embedded]
include_dir = "0.7"
# --- 异步与 eBPF (新增) ---
# Aya 用于加载和与内核 eBPF 程序交互
aya = "0.14.0"
mio = { version = "1.0", features = ["os-ext"] }
# 只开用到的特性:current_thread runtime 的 block_on/spawn(rt)、
# time::interval(time)、sync::watch(sync)。未用 macros(无 #[tokio::main]),
# 也未用 fs/net/io/process/signal,故不再开 full;两个 eBPF 监控线程各自只跑
# 一个 async 循环(无跨线程 spawn 需求),用 current_thread 即可,不需要 rt-multi-thread
tokio = { version = "1", features = ["rt", "time", "sync"] }
# --- Monitor 带来的依赖 ---
inotify = "0.11.1"
regex = "1.12"
kobject-uevent = "0.2"
netlink-sys = "0.9"
# --- Scheduler 带来的依赖 ---
nix = { version = "0.31.2", features = ["fs", "signal", "inotify"] }
fluent = "0.17.0"
fluent-bundle = "0.16.0"
intl-memoizer = "0.5.3"
# --- 远程提醒(remindPush.json 拉取)---
# ureq 3 默认 = [rustls, gzip]:rustls 走 ring(C/asm,与 zstd-sys 同口径需 cc,
# CI 的 lint 步骤已注入 NDK CC_/AR_/CFLAGS_),根证书用 webpki-roots 内嵌(不依赖系统 CA 路径,
# Android 上系统 CA 目录对 daemon 不一定可读)。刻意关掉默认 gzip 省一个 flate2 依赖:
# 目标接口返回的是未压缩 JSON,真遇到 Content-Encoding: gzip 也只需重新评估
ureq = { version = "3", default-features = false, features = ["rustls"] }
serde_json = "1"
# --- 日志归档压缩(内置库,进程内压缩,不依赖设备任何压缩二进制;2026-10-12 由 tar.lz4/gzip 迁移到 tar.zst)---
# zstd 走 vendored C(zstd-sys + cc,本仓第一个 C 依赖);级别口径:启动归档 2/导出 CLI 19(接近极限压缩率),
# 压缩统一 6 线程(zstdmt feature 开 multithread API)
zstd = { version = "0.13", features = ["zstdmt"] }
[profile.release]
strip = true
opt-level = "z"
lto = true
codegen-units = 1