I'm trying to use the PDH definitions provided by winapi. With this Cargo.toml, I get "use of undeclared crate or module winapi":
[package]
name = "windows-disk-exporter"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
prometheus = "0.13.2"
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["pdh"] }
[dependencies.windows]
version = "0.42.0"
features = [
"Win32_System_Performance",
]
Adding winapi to the dependencies however, gives me "could not find um in winapi":
[package]
name = "windows-disk-exporter"
version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
prometheus = "0.13.2"
winapi = { version = "0.3.9", features = ["pdh"] }
[target.'cfg(windows)'.dependencies]
winapi = { version = "0.3.9", features = ["pdh"] }
[dependencies.windows]
version = "0.42.0"
features = [
"Win32_System_Performance",
]
I know I am missing something as I am new to Rust, but what?
I'm trying to use the PDH definitions provided by winapi. With this Cargo.toml, I get "use of undeclared crate or module
winapi
":Adding winapi to the dependencies however, gives me "could not find
um
inwinapi
":I know I am missing something as I am new to Rust, but what?