Add no_std support to bevy_input#16995
Merged
alice-i-cecile merged 5 commits intobevyengine:mainfrom Dec 29, 2024
Merged
Conversation
Also fixed some minor issues with `bevy_math` and `bevy_ecs`
no_std support to `bevy_inputno_std support to bevy_input
BenjaminBrienen
approved these changes
Dec 27, 2024
BenjaminBrienen
approved these changes
Dec 29, 2024
| use bevy_reflect::Reflect; | ||
|
|
||
| #[cfg(not(feature = "smol_str"))] | ||
| use alloc::string::String as SmolStr; |
Contributor
Author
There was a problem hiding this comment.
Just avoids further changing code without reason, but I do agree this isn't pretty haha. I'm hoping the PR I've made upstream will be worked-on/accepted so we can just remove this feature gate entirely.
IQuick143
reviewed
Dec 29, 2024
| "serialize", | ||
| ] } | ||
| bevy_math = { path = "../bevy_math", version = "0.15.0-dev", default-features = false, features = [ | ||
| "rand", |
Contributor
There was a problem hiding this comment.
Seems that the bevy_math/rand feature just disappeared during these changes.
Is that intentional? (I mean I don't see a reason for bevy_input to need random numbers.)
Contributor
Author
There was a problem hiding this comment.
Yeah I deliberately left that feature off since I couldn't see anything in bevy_input that actually needed it.
alice-i-cecile
approved these changes
Dec 29, 2024
ecoskey
pushed a commit
to ecoskey/bevy
that referenced
this pull request
Jan 6, 2025
# Objective - Contributes to bevyengine#15460 ## Solution - Added the following features: - `std` (default) - `smol_str` (default) - `portable-atomic` - `critical-section` - `libm` - Fixed an existing issue where `bevy_reflect` wasn't properly feature gated. ## Testing - CI ## Notes - There were some minor issues with `bevy_math` and `bevy_ecs` noticed in this PR which I have also resolved here. I can split these out if desired, but I've left them here for now as they're very small changes and I don't consider this PR itself to be very controversial. - `libm`, `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. - `smol_str` is gated as it doesn't support atomically challenged platforms (e.g., Raspberry Pi Pico). I have an issue and a [PR](rust-analyzer/smol_str#91) to discuss this upstream.
mrchantey
pushed a commit
to mrchantey/bevy
that referenced
this pull request
Feb 4, 2025
# Objective - Contributes to bevyengine#15460 ## Solution - Added the following features: - `std` (default) - `smol_str` (default) - `portable-atomic` - `critical-section` - `libm` - Fixed an existing issue where `bevy_reflect` wasn't properly feature gated. ## Testing - CI ## Notes - There were some minor issues with `bevy_math` and `bevy_ecs` noticed in this PR which I have also resolved here. I can split these out if desired, but I've left them here for now as they're very small changes and I don't consider this PR itself to be very controversial. - `libm`, `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. - `smol_str` is gated as it doesn't support atomically challenged platforms (e.g., Raspberry Pi Pico). I have an issue and a [PR](rust-analyzer/smol_str#91) to discuss this upstream.
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.
Objective
no_stdBevy #15460Solution
std(default)smol_str(default)portable-atomiccritical-sectionlibmbevy_reflectwasn't properly feature gated.Testing
Notes
bevy_mathandbevy_ecsnoticed in this PR which I have also resolved here. I can split these out if desired, but I've left them here for now as they're very small changes and I don't consider this PR itself to be very controversial.libm,portable-atomic, andcritical-sectionare shortcuts to enable the relevant features in dependencies, making the usage of this crate on atomically challenged platforms possible and simpler.smol_stris gated as it doesn't support atomically challenged platforms (e.g., Raspberry Pi Pico). I have an issue and a PR to discuss this upstream.