Skip to content

Conversation

bushrat011899
Copy link
Contributor

@bushrat011899 bushrat011899 commented Jun 19, 2025

Connections

Description

Across Wgpu's various crates there is a need for locking primitives, such as Mutex and RwLock. Currently, each crate independently imports from either std, parking_lot, or potentially uses a RefCell-based fallback for no_std compatibility. This leads to duplicated implementations of the fallback logic. This PR centralizes these Mutex and RwLock definitions into wgpu-types, allowing them to be re-used across Wgpu. Note that while that is the intention of this PR, currently it just adds the types to wgpu-types; it does not switch the various crates to it. I consider this to be a reasonable split to reduce merge conflicts while the design is reviewed.

Testing

  • CI

Squash or Rebase?

  • Rebase

Checklist

  • Run cargo fmt.
  • Run taplo format.
  • Run cargo clippy --tests. If applicable, add:
    • --target wasm32-unknown-unknown
  • Run cargo xtask test to run tests.
  • If this contains user-facing changes, add a CHANGELOG.md entry.

@bushrat011899 bushrat011899 requested a review from a team as a code owner June 19, 2025 01:44
@bushrat011899 bushrat011899 mentioned this pull request Jun 19, 2025
6 tasks
@Wumpf
Copy link
Member

Wumpf commented Jul 2, 2025

Waiting for resolution of ongoing conversation there #7746 (comment)

@cwfitzgerald cwfitzgerald assigned cwfitzgerald and unassigned Wumpf Jul 16, 2025
@cwfitzgerald cwfitzgerald marked this pull request as draft August 27, 2025 20:20
@cwfitzgerald cwfitzgerald removed their assignment Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants