Skip to content

Commit

Permalink
gles/wgl: Migrate from ancient/unmaintained winapi to windows-rs
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Jul 22, 2024
1 parent 101c996 commit 264f81c
Show file tree
Hide file tree
Showing 5 changed files with 282 additions and 223 deletions.
10 changes: 8 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Please add your PR to the changelog! Choose from a top level and bottom
level category, then write your changes like follows:
- Describe your change in a user friendly format by @yourslug in [#99999](https://github.com/gfx-rs/wgpu/pull/99999)
- Describe your change in a user friendly format. By @yourslug in [#99999](https://github.com/gfx-rs/wgpu/pull/99999)
You can add additional user facing information if it's a major breaking change. You can use the following to help:
Expand Down Expand Up @@ -48,6 +48,12 @@ Bottom level categories:
- 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)
- Print requested and supported usages on `UnsupportedUsage` error. By @VladasZ in [#6007](https://github.com/gfx-rs/wgpu/pull/6007)

### Dependency Updates

#### GLES

- Replace `winapi` code in WGL wrapper to use the `windows` crate. By @MarijnS95 in [#6006](https://github.com/gfx-rs/wgpu/pull/6006)

## 22.0.0 (2024-07-17)

### Overview
Expand All @@ -57,7 +63,7 @@ Bottom level categories:
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):

> ### How do I know when to release 1.0.0?
>
>
> 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.
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.
Expand Down
131 changes: 98 additions & 33 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,9 @@ khronos-egl = "6"
glow = "0.14.0"
glutin = "0.29.1"

# DX and GLES dependencies
windows = { version = "0.58", default-features = false }

# wasm32 dependencies
console_error_panic_hook = "0.1.7"
console_log = "1"
Expand Down
7 changes: 6 additions & 1 deletion wgpu-hal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ gles = [
"dep:khronos-egl",
"dep:libloading",
"dep:ndk-sys",
"winapi/libloaderapi",
"windows/Win32_Graphics_OpenGL",
"windows/Win32_Graphics_Gdi",
"windows/Win32_System_LibraryLoader",
"windows/Win32_UI_WindowsAndMessaging",
]
## Enables the DX12 backend when targeting Windows.
##
Expand Down Expand Up @@ -144,6 +147,8 @@ khronos-egl = { version = "6", features = ["static", "no-pkg-config"] }
libloading = { version = ">=0.7, <0.9", optional = true }

[target.'cfg(windows)'.dependencies]
# backend: Dx12 and Gles
windows = { workspace = true, optional = true }
# backend: Dx12
bit-set = { version = "0.8", optional = true }
range-alloc = { version = "0.1", optional = true }
Expand Down
Loading

0 comments on commit 264f81c

Please sign in to comment.