-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCargo.toml
55 lines (45 loc) · 1.3 KB
/
Cargo.toml
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
[package]
name = "hardware_monitor"
version = "0.1.1"
edition = "2021"
authors = ["CREATSAIF"]
description = "A hardware monitoring API service"
[dependencies]
actix-web = "4.4"
sysinfo = { version = "0.29", features = ["serde"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tokio = { version = "1.0", features = ["full"] }
actix-cors = "0.6"
env_logger = "0.10"
log = "0.4"
chrono = { version = "0.4", features = ["serde"] }
parking_lot = "0.12"
libc = "0.2"
[target.'cfg(target_os = "linux")'.dependencies]
procfs = "0.15"
nvml-wrapper = { version = "0.9", optional = true }
[target.'cfg(target_os = "windows")'.dependencies]
windows = { version = "0.48", features = ["Win32_System_Performance", "Win32_Foundation", "Win32_System_Power"] }
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation = "0.9"
mach = "0.3"
[features]
default = []
nvml = ["nvml-wrapper"]
[profile.release]
opt-level = 3
lto = true
codegen-units = 1
panic = 'abort'
strip = true
# 为不同的目标平台启用特定的优化
[target.'cfg(target_arch = "x86_64")'.profile.release]
target-cpu = "x86-64"
[target.'cfg(target_arch = "aarch64")'.profile.release]
target-cpu = "generic"
[target.'cfg(target_arch = "arm")'.profile.release]
target-cpu = "generic"
[[bin]]
name = "hardware_monitor"
path = "src/main.rs"