[wgpu-sync]: Centralize usage of once_cell - #10091
Open
bushrat011899 wants to merge 5 commits into
Open
Conversation
kpreid
requested changes
Aug 18, 2026
bushrat011899
force-pushed
the
wgpu_sync_once_cell
branch
from
August 18, 2026 03:23
d53aaca to
62cf5ae
Compare
Centralizes configuration of `once_cell` and avoids duplicating fallback logic across crates.
Replaces both `std::sync` and `once_cell` usage.
The project is otherwise not `no_alloc` compatible, and is capable of making a breaking change in the future if desirable. Co-Authored-By: Kevin Reid <kpreid@switchb.org>
bushrat011899
force-pushed
the
wgpu_sync_once_cell
branch
from
August 18, 2026 22:10
62cf5ae to
bb01756
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Connections
None.
Description
While working on #9780, I noticed
once_cellandstd::syncare inconsistently used acrosswgpu-halandwgpu-core. Similar to that PR, I'm proposing we centralize usage ofLazy,OnceCell, etc. towgpu-sync, to makeno_stdconfiguration simpler and reduce maintenance burden.Testing
cargo check, as there are no changes in the public API or behaviour (beyond exportingonce_cellin the psuedo-publicwgpu-syncAPI).Squash or Rebase?
Rebase.
Checklist
wgpumay be affected behaviorally.CHANGELOG.mdentries for the user-facing effects of this change are present.