forked from GuillaumeGomez/sysinfo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCargo.toml
More file actions
149 lines (140 loc) · 4.69 KB
/
Cargo.toml
File metadata and controls
149 lines (140 loc) · 4.69 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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
[package]
name = "sysinfo"
version = "0.37.2"
authors = ["Guillaume Gomez <guillaume1.gomez@gmail.com>"]
description = "Library to get system information such as processes, CPUs, disks, components and networks"
repository = "https://github.com/GuillaumeGomez/sysinfo"
license = "MIT"
readme = "README.md"
rust-version = "1.88"
exclude = ["/test-unknown"]
keywords = ["system-information", "disk", "process", "network", "cpu"]
edition = "2024"
[lib]
name = "sysinfo"
[features]
default = ["component", "disk", "network", "system", "user"]
component = [
"windows/Win32_Foundation",
"windows/Win32_Security",
"windows/Win32_System_Com",
"windows/Win32_System_Ole",
"windows/Win32_System_Rpc",
"windows/Win32_System_Variant",
"windows/Win32_System_Wmi",
"objc2-core-foundation/CFArray",
"objc2-core-foundation/CFBase",
"objc2-core-foundation/CFDictionary",
"objc2-core-foundation/CFNumber",
"objc2-core-foundation/CFString",
"objc2-io-kit",
"objc2-io-kit/hidsystem",
]
disk = [
"windows/Win32_Foundation",
"windows/Win32_Storage_FileSystem",
"windows/Win32_Security", # For `windows::Win32::Storage::FileSystem::CreateFileW`.
"windows/Win32_System_IO",
"windows/Win32_System_Ioctl",
"windows/Win32_System_SystemServices",
"windows/Win32_System_WindowsProgramming",
"objc2-core-foundation/CFArray",
"objc2-core-foundation/CFBase",
"objc2-core-foundation/CFDictionary",
"objc2-core-foundation/CFError",
"objc2-core-foundation/CFNumber",
"objc2-core-foundation/CFString",
"objc2-core-foundation/CFURL",
"objc2-io-kit",
]
system = [
"windows/Win32_Foundation",
"windows/Win32_System_Diagnostics_ToolHelp",
"windows/Wdk_System_SystemInformation",
"windows/Wdk_System_SystemServices",
"windows/Wdk_System_Threading",
"windows/Win32_Security_Authorization",
"windows/Win32_System_Diagnostics_Debug",
"windows/Win32_System_Kernel",
"windows/Win32_System_Memory",
"windows/Win32_System_Performance",
"windows/Win32_System_Power",
"windows/Win32_System_ProcessStatus",
"windows/Win32_System_Registry",
"windows/Win32_System_RemoteDesktop",
"windows/Win32_System_SystemInformation",
"windows/Win32_System_SystemServices",
"windows/Win32_System_Threading",
"windows/Win32_UI_Shell",
"dep:ntapi",
"dep:memchr",
"objc2-core-foundation/CFBase",
"objc2-core-foundation/CFData",
"objc2-core-foundation/CFDictionary",
"objc2-core-foundation/CFString",
"objc2-io-kit",
]
network = [
"windows/Win32_Foundation",
"windows/Win32_NetworkManagement_IpHelper",
"windows/Win32_NetworkManagement_Ndis",
"windows/Win32_Networking_WinSock",
]
user = [
"windows/Win32_Foundation",
"windows/Win32_NetworkManagement_NetManagement",
"windows/Win32_Security",
"windows/Win32_Security_Authentication_Identity",
"windows/Win32_Security_Authorization",
]
apple-sandbox = []
apple-app-store = ["apple-sandbox"]
c-interface = ["default"]
multithread = ["dep:rayon"]
linux-netdevs = []
linux-tmpfs = []
debug = ["libc/extra_traits"]
# This feature is used on CI to emulate unknown/unsupported target.
unknown-ci = []
[package.metadata.docs.rs]
features = ["serde"]
# Setting this default target to prevent `freebsd` to be the default one.
default-target = "x86_64-unknown-linux-gnu"
targets = [
"i686-unknown-linux-gnu",
"x86_64-apple-darwin",
"x86_64-pc-windows-msvc",
"i686-pc-windows-msvc",
"x86_64-unknown-freebsd",
]
cargo-args = ["-Zbuild-std"]
rustdoc-args = ["--generate-link-to-definition"]
[dependencies]
memchr = { version = "2.5", optional = true }
rayon = { version = "^1.8", optional = true }
serde = { version = "^1.0.190", optional = true, features = ["derive"] }
[target.'cfg(windows)'.dependencies]
ntapi = { version = "0.4", optional = true }
# Support a range of versions in order to avoid duplication of this crate. Make sure to test all
# versions when bumping to a new release, and only increase the minimum when absolutely necessary.
windows = { version = ">=0.62, <0.63", optional = true }
[target.'cfg(not(any(target_os = "unknown", target_arch = "wasm32")))'.dependencies]
libc = "^0.2.173"
[target.'cfg(any(target_os = "macos", target_os = "ios"))'.dependencies]
objc2-core-foundation = { version = "0.3.2", optional = true, default-features = false, features = [
"std",
] }
objc2-io-kit = { version = "0.3.2", optional = true, default-features = false, features = [
"std",
"libc",
] }
[dev-dependencies]
serde_json = "1.0" # Used in documentation tests.
bstr = "1.9.0"
tempfile = "3.9"
itertools = "0.14.0"
[[example]]
name = "simple"
path = "examples/simple.rs"
required-features = ["default"]
doc-scrape-examples = true