Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove dependency on once_cell #6379

Open
1 of 3 tasks
jimblandy opened this issue Oct 7, 2024 · 1 comment
Open
1 of 3 tasks

Remove dependency on once_cell #6379

jimblandy opened this issue Oct 7, 2024 · 1 comment

Comments

@jimblandy
Copy link
Member

jimblandy commented Oct 7, 2024

Much of the once_cell crate's API has now been added to std, so ideally we could remove this dependency. This is blocked on std::sync::OnceLock::get_or_try_init being stabilized:

As the once_cell author commented:

@jimblandy FWIW, if you are not using portable atomic, then probably you don't actually need once_cell crate. Most of the API is now available in std (but not in core), so I am thinking that the primary role of once_cell for the ecosystem right now is exactly to serve as a poly-fill for no-std use-cases.

At the moment, wgpu_core::pool::ResourcePool uses once_cell::sync::OnceCell::get_or_try_init, whose std analog, std::sync::OnceLock::get_or_try_init, is not yet stable.


PRs:

@ErichDonGubler
Copy link
Member

Got a PR roadmap laid out for doing this. Edited the OP with checkboxes so the steps are clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Todo
Development

No branches or pull requests

2 participants