Update Rust crate wmi to 0.18.3 (#17602)

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [wmi](https://redirect.github.com/ohadravid/wmi-rs) |
workspace.dependencies | minor | `0.16.0` → `0.18.0` |

---

### Release Notes

<details>
<summary>ohadravid/wmi-rs (wmi)</summary>

###
[`v0.18.0`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.18.0)

[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.3...v0.18.0)

#### What's Changed

- Remove `COMLibrary` and let `WMIConnection` initialize COM if needed
by [@&#8203;ohadravid](https://redirect.github.com/ohadravid) in
[#&#8203;137](https://redirect.github.com/ohadravid/wmi-rs/pull/137)
You can now call `WMIConnection::new()` and let the crate handle the
initialization internally.
Note: COM will NOT be uninitialized when the connection is dropped
(similar to <=0.17 versions, which didn't uninitialize COM on drop since
[#&#8203;53](https://redirect.github.com/ohadravid/wmi-rs/issues/53)).
If this is not what you want, then you must initialize COM yourself
**before** creating the connection. See the docs for more.
- Update the crate to Rust 2024 edition

**Full Changelog**:
<https://github.com/ohadravid/wmi-rs/compare/v0.17.3...v0.18.0>

###
[`v0.17.3`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.3)

[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.2...v0.17.3)

#### What's Changed

- chore(deps): update criterion requirement from 0.5 to 0.6 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;128](https://redirect.github.com/ohadravid/wmi-rs/pull/128)
- Update CI images by
[@&#8203;ohadravid](https://redirect.github.com/ohadravid) in
[#&#8203;135](https://redirect.github.com/ohadravid/wmi-rs/pull/135)
- chore(deps): update windows requirement from 0.61 to 0.62 by
[@&#8203;dependabot](https://redirect.github.com/dependabot)\[bot] in
[#&#8203;134](https://redirect.github.com/ohadravid/wmi-rs/pull/134)

**Full Changelog**:
<https://github.com/ohadravid/wmi-rs/compare/v0.17.2...v0.17.3>

###
[`v0.17.2`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.2)

[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.1...v0.17.2)

#### What's Changed

- feat(remote\_connection): added with\_credentials() by
[@&#8203;hatch15](https://redirect.github.com/hatch15) in
[#&#8203;127](https://redirect.github.com/ohadravid/wmi-rs/pull/127)

#### New Contributors

- [@&#8203;hatch15](https://redirect.github.com/hatch15) made their
first contribution in
[#&#8203;127](https://redirect.github.com/ohadravid/wmi-rs/pull/127)

**Full Changelog**:
<https://github.com/ohadravid/wmi-rs/compare/v0.17.1...v0.17.2>

###
[`v0.17.1`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.1)

[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.17.0...v0.17.1)

#### What's Changed

- Support arrays of IUnknown pointers by
[@&#8203;samin-cf](https://redirect.github.com/samin-cf) in
[#&#8203;125](https://redirect.github.com/ohadravid/wmi-rs/pull/125) and
[@&#8203;ohadravid](https://redirect.github.com/ohadravid) in
[#&#8203;126](https://redirect.github.com/ohadravid/wmi-rs/pull/126)

**Full Changelog**:
<https://github.com/ohadravid/wmi-rs/compare/v0.17.0...v0.17.1>

###
[`v0.17.0`](https://redirect.github.com/ohadravid/wmi-rs/releases/tag/v0.17.0)

[Compare
Source](https://redirect.github.com/ohadravid/wmi-rs/compare/v0.16.0...v0.17.0)

#### What's Changed

- Added support for Option by
[@&#8203;vpopescu](https://redirect.github.com/vpopescu) in
[#&#8203;122](https://redirect.github.com/ohadravid/wmi-rs/pull/122)

#### Breaking Changes

- Fixed conversions from Rust types to WMI types (so, only when used for
method calling or using put\_property), which were incorrect in a few
cases (notably, u32s and u16s were not converted correctly), and added
some missing conversions, in
[#&#8203;124](https://redirect.github.com/ohadravid/wmi-rs/pull/124)
- `SafeArrayAccessor::new` now accepts a `NonNull<SAFEARRAY>` instead of
a reference, in
[#&#8203;124](https://redirect.github.com/ohadravid/wmi-rs/pull/124)

#### New Contributors

- [@&#8203;vpopescu](https://redirect.github.com/vpopescu) made their
first contribution in
[#&#8203;122](https://redirect.github.com/ohadravid/wmi-rs/pull/122)

**Full Changelog**:
<https://github.com/ohadravid/wmi-rs/compare/v0.16.0...v0.17.0>

</details>

---

### Configuration

📅 **Schedule**: Branch creation - Between 12:00 AM and 03:59 AM, only on
Monday ( * 0-3 * * 1 ) (UTC), Automerge - At any time (no schedule
defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/astral-sh/uv).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi43NC41IiwidXBkYXRlZEluVmVyIjoiNDIuNzQuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiaW50ZXJuYWwiXX0=-->

---------

Co-authored-by: konstin <konstin@mailbox.org>
Co-authored-by: Zanie Blue <contact@zanie.dev>
This commit is contained in:
renovate[bot]
2026-03-13 20:32:00 +00:00
committed by GitHub
parent cb109d4808
commit 8337ffaffd
3 changed files with 19 additions and 25 deletions
Generated
+2 -2
View File
@@ -8052,9 +8052,9 @@ dependencies = [
[[package]]
name = "wmi"
version = "0.16.0"
version = "0.18.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d9189bc72f0e4d814d812216ec06636ce3ea5597ff5f1ff9f9f0e5ec781c027"
checksum = "003e65f4934cf9449b9ce913ad822cd054a5af669d24f93db101fdb02856bb23"
dependencies = [
"futures",
"log",
+1 -1
View File
@@ -296,7 +296,7 @@ windows = { version = "0.61.0", features = [
windows-registry = { version = "0.5.0" }
windows-version = { version = "0.1.6" }
wiremock = { version = "0.6.4" }
wmi = { version = "0.16.0", default-features = false }
wmi = { version = "0.18.3", default-features = false }
xz2 = { version = "0.1.7", features = ["static"] }
zeroize = { version = "1.8.1" }
zip = { version = "8.1.0", default-features = false, features = [
+16 -22
View File
@@ -9,7 +9,7 @@ use uv_static::EnvVars;
#[cfg(windows)]
use serde::Deserialize;
#[cfg(windows)]
use wmi::{COMLibrary, WMIConnection};
use wmi::WMIConnection;
#[derive(Debug, thiserror::Error)]
pub enum AcceleratorError {
@@ -208,34 +208,28 @@ impl Accelerator {
name: Option<String>,
}
match COMLibrary::new() {
Ok(com_library) => match WMIConnection::new(com_library) {
Ok(wmi_connection) => match wmi_connection.query::<VideoController>() {
Ok(gpu_controllers) => {
for gpu_controller in gpu_controllers {
if let Some(pnp_device_id) = &gpu_controller.pnp_device_id {
if pnp_device_id
.contains(&format!("VEN_{PCI_VENDOR_ID_INTEL:04X}"))
{
debug!(
"Detected Intel GPU from WMI: PNPDeviceID={}, Name={:?}",
pnp_device_id, gpu_controller.name
);
return Ok(Some(Self::Xpu));
}
match WMIConnection::new() {
Ok(wmi_connection) => match wmi_connection.query::<VideoController>() {
Ok(gpu_controllers) => {
for gpu_controller in gpu_controllers {
if let Some(pnp_device_id) = &gpu_controller.pnp_device_id {
if pnp_device_id.contains(&format!("VEN_{PCI_VENDOR_ID_INTEL:04X}"))
{
debug!(
"Detected Intel GPU from WMI: PNPDeviceID={}, Name={:?}",
pnp_device_id, gpu_controller.name
);
return Ok(Some(Self::Xpu));
}
}
}
Err(e) => {
debug!("Failed to query WMI for video controllers: {e}");
}
},
}
Err(e) => {
debug!("Failed to create WMI connection: {e}");
debug!("Failed to query WMI for video controllers: {e}");
}
},
Err(e) => {
debug!("Failed to initialize COM library: {e}");
debug!("Failed to create WMI connection: {e}");
}
}
}