Skip to content

Conversation

@FalkWoldmann
Copy link

@FalkWoldmann FalkWoldmann commented Dec 3, 2025

Description
Right now, we always use once_cell in naga, even when std with LazyLock is available.

Testing
I ran cargo xtask test locally.

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.

@FalkWoldmann
Copy link
Author

The "cleanest" way of ensuring that once_lock is actually optional for std builds would be to introduce an explicit std feature. This would, however, mean breaking changes for no_std users, as they would then need to add naga with no default features and the once_cell feature. Would this be okay with you?

@ErichDonGubler
Copy link
Member

@FalkWoldmann: Yes, please! Filed #8701 for tracking. 🙂

Copy link
Member

@ErichDonGubler ErichDonGubler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code overall LGTM, but before I merge: What's the motivation for making this change? Is it to eliminate an unused dependency?

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.

2 participants