-
Notifications
You must be signed in to change notification settings - Fork 53
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
Raw window handle strategy #141
Comments
Ah, right, yes we should add some corresponding features in |
Actually I'm not entirely sure we need to do anything special in this crate? There is a general issue that Cargo features are additive and I think perhaps the Winit and This crate doesn't currently have any opinion about We could perhaps explicitly pass Since we don't currently re-export the That would then increase the chances that you might be able to build without pulling in Or maybe I'm missing some other details here? |
I think your analysis is correct, https://github.com/rust-mobile/ndk/blob/f414cabc12211ebcba4edb3da90950967d4a1933/ndk/Cargo.toml#L16 is problematic because of implicit dependency. It forces me to pass In the end it's a matter of how strongly winit and ndk wants to promote the latest dependency for raw_window_handle. It might be worth to open an issue on their side to bring your point about the "whack a mole".
I think it's correct for most, but if a crate were to not explicitly pass the feature to ndk, it would break them, but in practice it's probably not a lot (because I'm assuming dependants have winit in their dependencies, which will handle that ndk/rwh feature.). Still, my point is it's theoretically possible? |
My current assumption/understanding is that these features are additive, so technically you shouldn't need to pass If that assumption is wrong though and these features really are mutually exclusive then I think there's probably a more serious concern here and the default should almost certainly be removed from the ndk/winit crates. |
Thanks for the correction! I just tested so I confirm these features are additive and not mutually exclusive. So yeah this issue is less blocking than I thought 🎉, still might be an improvement for compile times and general understanding of the dependency tree ( |
Okey, good to confirm that they are additive! Yeah it's not ideal that it's awkward to avoid the Since we currently only have quite a minimal exposure of the |
Shall we drop this after all? It wasn't optional before and I've kept it that way for |
The `ndk` crate enables `raw-window-handle 0.6` by default (because of rust-mobile/ndk#434 (comment)) which might not be used by consumers of the `android-activity` crate at all, or might (still) be a mismatching version. Even if the `rwh_0x` features are additive, figuring that out leads to cryptic errors and it is best to turn off these defaults completely and leave it to the user to turn it back on in their own `[dependencies]` section if desired.
I think I like the default to "latest supported window-raw-handle":
I agree on your point it was noticed because the ecosystem is behind on 0.5. |
I'd guess that maybe it would have been ok to not provide a default from the pov that most things have no opinion on which feature is enabled and then it could have been left up to the middleware glue crates to make the choice according to what they need (e.g. if you know what version of wgpu you're using and what version of raw-window-handle it needs you can then enable the corresponding but a default of |
Hello, I'm attempting to update our dependencies (from bevy, through winit).
Following rust-mobile/ndk#434, It looks like I cannot set a feature to use a specific raw-window-handle implementation (0.5). Would you be interested in supporting it ? How can we move forward ?
The text was updated successfully, but these errors were encountered: