-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
bevy_input
is now optional, but there's no way to enable it
#18397
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
Comments
@bushrat011899 may know better, but my instincts say we're just missing a feature flag. |
Tl;Dr enable either The problem is I'll give this another look though and see if there's a way to make this more intuitive! |
Cutting from the milestone: that's a good enough workaround for me to be comfortable shipping it. Rust please give us enum features 🥺 |
Gotcha, thanks. So the play for maximum compatibility would be to add a matching Side note: we may want to amend https://bevyengine.org/learn/quick-start/plugin-development/#small-crate-size |
Yep! In the release notes we'll call out a newly added example in |
Pre-RFC for a cargo feature in this space: https://internals.rust-lang.org/t/pre-rfc-mutually-excusive-global-features/19618 |
# Objective - Fixes #18397 - Supersedes #18474 - Simplifies 0.16 migration ## Solution - Upgrade to Glam 0.29.3, which has backported the `nostd-libm` feature. - Expose a similar feature in `bevy_math` and enable it in `bevy_internal`, allowing `bevy_math`, `bevy_input`, and `bevy_transform` to be unconditional dependencies again. ## Testing - CI --- ## Notes - This includes `libm` as a dependency, but this was already the case in the common scenario where `rand` or many other features were enabled. Considering `libm` is an official Rust crate, it's a very low-risk dependency to unconditionally include. - For users who do not want `libm` included, simply import Bevy's subcrates directly, since `bevy_math/nostd-libm` will not be enabled. - I know we are _very_ late in the RC cycle for 0.16, but this has a substantial impact on the usability of `bevy` that I consider worth including.
- Fixes #18397 - Supersedes #18474 - Simplifies 0.16 migration - Upgrade to Glam 0.29.3, which has backported the `nostd-libm` feature. - Expose a similar feature in `bevy_math` and enable it in `bevy_internal`, allowing `bevy_math`, `bevy_input`, and `bevy_transform` to be unconditional dependencies again. - CI --- - This includes `libm` as a dependency, but this was already the case in the common scenario where `rand` or many other features were enabled. Considering `libm` is an official Rust crate, it's a very low-risk dependency to unconditionally include. - For users who do not want `libm` included, simply import Bevy's subcrates directly, since `bevy_math/nostd-libm` will not be enabled. - I know we are _very_ late in the RC cycle for 0.16, but this has a substantial impact on the usability of `bevy` that I consider worth including.
Bevy version
main, since #17955
What you did
Attempted to migrate a crate dealing with input and using
default-features = false
to Bevy0.16-dev
What went wrong
And there doesn't appear to be any way of rectifying this. It seems that we need a new
bevy_input
feature, but it's also possible thatbevy_input
becoming optional was a mistake. I haven't been following theno_std
effort closely, so I'm not sure.A bad workaround is to add the
std
feature, which includesbevy_input
. (This may be a separate bug. Seems like withbevy_input
optional,bevy_internal/std
should be usingbevy_input?/std
).The text was updated successfully, but these errors were encountered: