-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Add portable-atomic
support to bevy_utils
for once!
#17027
Add portable-atomic
support to bevy_utils
for once!
#17027
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice :) I particularly appreciate the docs on the features.
I think eventually we should have this kind of code live in a |
Totally agree, just wanted to sneak this change in as-is to unblock #17028. |
# Objective - Contributes to #15460 ## Solution - Added the following features: - `std` (default) - `portable-atomic` - `critical-section` ## Testing - CI ## Notes - `portable-atomic`, and `critical-section` are shortcuts to enable the relevant features in dependencies, making the usage of this crate on atomically challenged platforms possible and simpler. - This PR is blocked until #17027 is merged (as it depends on fixes for the `once!` macro). Once merged, the change-count for this PR should reduce.
…#17027) # Objective - Improves platform compatibility for `bevy_utils` ## Solution - Added `portable-atomic` to allow using the `once!` macro on more platforms (e.g., Raspberry Pi Pico) ## Testing - CI ## Notes - This change should be entirely hidden thanks to the use of `doc(hidden)`. Enabling the new `portable-atomic` feature just allows using the `once!` macro on platforms which previously could not. - I took the liberty of updating the feature documentation to be more in line with how I've documented features in `bevy_ecs`/`bevy_app`/etc. for their `no_std` updates.
# Objective - Contributes to bevyengine#15460 ## Solution - Added the following features: - `std` (default) - `portable-atomic` - `critical-section` ## Testing - CI ## Notes - `portable-atomic`, and `critical-section` are shortcuts to enable the relevant features in dependencies, making the usage of this crate on atomically challenged platforms possible and simpler. - This PR is blocked until bevyengine#17027 is merged (as it depends on fixes for the `once!` macro). Once merged, the change-count for this PR should reduce.
Objective
bevy_utils
Solution
portable-atomic
to allow using theonce!
macro on more platforms (e.g., Raspberry Pi Pico)Testing
Notes
doc(hidden)
. Enabling the newportable-atomic
feature just allows using theonce!
macro on platforms which previously could not.bevy_ecs
/bevy_app
/etc. for theirno_std
updates.