Skip to content

Commit 264f81c

Browse files
committed
gles/wgl: Migrate from ancient/unmaintained winapi to windows-rs
1 parent 101c996 commit 264f81c

File tree

5 files changed

+282
-223
lines changed

5 files changed

+282
-223
lines changed

CHANGELOG.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Please add your PR to the changelog! Choose from a top level and bottom
55
level category, then write your changes like follows:
66
7-
- Describe your change in a user friendly format by @yourslug in [#99999](https://github.com/gfx-rs/wgpu/pull/99999)
7+
- Describe your change in a user friendly format. By @yourslug in [#99999](https://github.com/gfx-rs/wgpu/pull/99999)
88
99
You can add additional user facing information if it's a major breaking change. You can use the following to help:
1010
@@ -48,6 +48,12 @@ Bottom level categories:
4848
- Bump MSRV for `d3d12`/`naga`/`wgpu-core`/`wgpu-hal`/`wgpu-types`' to 1.76. By @wumpf in [#6003](https://github.com/gfx-rs/wgpu/pull/6003)
4949
- Print requested and supported usages on `UnsupportedUsage` error. By @VladasZ in [#6007](https://github.com/gfx-rs/wgpu/pull/6007)
5050

51+
### Dependency Updates
52+
53+
#### GLES
54+
55+
- Replace `winapi` code in WGL wrapper to use the `windows` crate. By @MarijnS95 in [#6006](https://github.com/gfx-rs/wgpu/pull/6006)
56+
5157
## 22.0.0 (2024-07-17)
5258

5359
### Overview
@@ -57,7 +63,7 @@ Bottom level categories:
5763
For the first time ever, WGPU is being released with a major version (i.e., 22.* instead of 0.22.*)! Maintainership has decided to fully adhere to [Semantic Versioning](https://semver.org/)'s recommendations for versioning production software. According to [SemVer 2.0.0's Q&A about when to use 1.0.0 versions (and beyond)](https://semver.org/spec/v2.0.0.html#how-do-i-know-when-to-release-100):
5864

5965
> ### How do I know when to release 1.0.0?
60-
>
66+
>
6167
> If your software is being used in production, it should probably already be 1.0.0. If you have a stable API on which users have come to depend, you should be 1.0.0. If you’re worrying a lot about backward compatibility, you should probably already be 1.0.0.
6268
6369
It is a well-known fact that WGPU has been used for applications and platforms already in production for years, at this point. We are often concerned with tracking breaking changes, and affecting these consumers' ability to ship. By releasing our first major version, we publicly acknowledge that this is the case. We encourage other projects in the Rust ecosystem to follow suit.

Cargo.lock

Lines changed: 98 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ khronos-egl = "6"
160160
glow = "0.14.0"
161161
glutin = "0.29.1"
162162

163+
# DX and GLES dependencies
164+
windows = { version = "0.58", default-features = false }
165+
163166
# wasm32 dependencies
164167
console_error_panic_hook = "0.1.7"
165168
console_log = "1"

wgpu-hal/Cargo.toml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,10 @@ gles = [
6161
"dep:khronos-egl",
6262
"dep:libloading",
6363
"dep:ndk-sys",
64-
"winapi/libloaderapi",
64+
"windows/Win32_Graphics_OpenGL",
65+
"windows/Win32_Graphics_Gdi",
66+
"windows/Win32_System_LibraryLoader",
67+
"windows/Win32_UI_WindowsAndMessaging",
6568
]
6669
## Enables the DX12 backend when targeting Windows.
6770
##
@@ -144,6 +147,8 @@ khronos-egl = { version = "6", features = ["static", "no-pkg-config"] }
144147
libloading = { version = ">=0.7, <0.9", optional = true }
145148

146149
[target.'cfg(windows)'.dependencies]
150+
# backend: Dx12 and Gles
151+
windows = { workspace = true, optional = true }
147152
# backend: Dx12
148153
bit-set = { version = "0.8", optional = true }
149154
range-alloc = { version = "0.1", optional = true }

0 commit comments

Comments
 (0)