Skip to content

Commit 2611d18

Browse files
MarijnS95teoxoy
authored andcommitted
gles/wgl: Migrate from ancient/unmaintained winapi to windows-rs
1 parent 591e1d2 commit 2611d18

File tree

5 files changed

+280
-222
lines changed

5 files changed

+280
-222
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
@@ -55,6 +55,12 @@ Bottom level categories:
5555
- Print requested and supported usages on `UnsupportedUsage` error. By @VladasZ in [#6007](https://github.com/gfx-rs/wgpu/pull/6007)
5656
- Fix function for checking bind compatibility to error instead of panic. By @sagudev [#6012](https://github.com/gfx-rs/wgpu/pull/6012)
5757

58+
### Dependency Updates
59+
60+
#### GLES
61+
62+
- Replace `winapi` code in WGL wrapper to use the `windows` crate. By @MarijnS95 in [#6006](https://github.com/gfx-rs/wgpu/pull/6006)
63+
5864
## 22.0.0 (2024-07-17)
5965

6066
### Overview
@@ -64,7 +70,7 @@ Bottom level categories:
6470
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):
6571

6672
> ### How do I know when to release 1.0.0?
67-
>
73+
>
6874
> 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.
6975
7076
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: 97 additions & 32 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)