[lib]
# 设置 crate 类型，有三个选项：`rlib` (Rust library)，`dylib` (dynamic library)，`cdylib` (C-compatible dynamic library)
crate-type = ["rlib"]
proc-macro = false

[features]
log = ["e-log/log"]
tracing = ["e-log/tracing"]
ohm = ["wmi", "system"]
aida64 = ["wmi", "system"]
cli = ["structopt"]
system = ["sysinfo/system"]
user = ["sysinfo/user", "desktop"]
desktop = [
    "windows/Win32_Foundation",
    "windows/Win32_Storage_FileSystem",
    "windows/Win32_NetworkManagement_NetManagement",
]
network = ["sysinfo/network", "net-interface", "futures"]
multithread = ["sysinfo/multithread"]
disk = ["sysinfo/disk"]
component = ["sysinfo/component"]
drive = [
    "winapi/winbase",
    "winapi/libloaderapi",
    "winapi/minwinbase",
    "winapi/winuser",
]
file-info = ["goblin", "winapi/winbase", "winapi/processenv"]
os-system = []
os-office = []
build = ["winresource", "static_vcruntime", "e-utils/build"]
built = ["dep:built", "e-utils/fs"]
net-interface = [
    "windows/Win32_Foundation",
    "windows/Win32_NetworkManagement_IpHelper",
    "windows/Win32_Networking_WinSock",
    "libc",
]
os = [
    "system",
    "user",
    "network",
    "multithread",
    "disk",
    "component",
    "os-system",
    "os-office",
]
default = ["ohm", "aida64", "os", "cli", "file-info", "drive", "tracing"]

[target.'cfg(windows)'.build-dependencies]
winresource = { version = "0.1", optional = true }
static_vcruntime = { version = "2", optional = true }
[build-dependencies]
built = { version = "0.7", features = ["chrono", "git2"], optional = true }
e-utils = { version = "0.4" }

[target.'cfg(target_os="windows")'.dependencies]
wmi = { version = "0.14", optional = true }
windows = { version = "0.30", optional = true }
winapi = { version = "0.3.9", optional = true }

[dependencies]
e-utils = { version = "0.4", features = ["tokio", "cmd", "parse"] }
tokio = { version = "1", features = ["full"] }
serde = { version = "1", features = ["derive"] }
serde_json = "1.0"
structopt = { version = "0.3", optional = true }
strum = { version = "0.26", features = ["derive"] }
sysinfo = { version = "0.33", default-features = false }
libc = { version = "0.2", optional = true }
futures = { version = "0.3", optional = true }
goblin = { version = "0.9", optional = true }
e-log = { version = "0.3", optional = true }

[dev-dependencies]
hw = { path = "./" }

[package]
name = "hw"
version = "0.1.8"
authors = ["Eternal(梦游) <EternalNightYeah2@yeah.net>"]
edition = "2021"
rust-version = "1.78.0"
license-file = "LICENSE"
homepage = "https://gitee.com/eternalnight996"
description = "强大而统一的跨平台硬件监控工具"
documentation = "https://docs.rs/hw"
keywords = ["hardware", "monitor", "system", "sensors", "hw"]
categories = [
    "hardware-support",
    "os::windows-apis",
    "development-tools::debugging",
    "os",
    "command-line-utilities",
]
include = ["src/", "*.md", "LICENSE", "Cargo.toml", "COPYRIGHT", "build.rs"]
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
