Open antonilol opened 2 weeks ago
looks to be the case for hidapi
as well, adding and removing an enum member is a breaking change.
event.rs:301, enum member is cfg'ed out:
#[cfg(feature = "hidapi")]
ControllerSensorUpdated = SDL_EventType::SDL_CONTROLLERSENSORUPDATE as u32,
Impossible without features for the first one unfortunately.
For Hidapi I think the feature can be removed as it used to be experimental in SDL2 but now is quite stable, but I'm not 100% sure.
Reference on feature flags: https://doc.rust-lang.org/cargo/reference/features.html#feature-unification
If I, in a library, use
Texture<'a>
and a user of my library enables theunsafe_textures
feature flag onsdl2
, then the code in the library no longer compiles, because the changes (the difference between havingunsafe_textures
enabled or disabled) are not SemVer compatible.I suggest making a new struct, that wraps
Texture<'static>
(or the contents of it) and provides unsafe methods to use it (unsafe because it is not known if the pointer is still valid), could even be without feature flag to allow using both, where needed. (I did not test this, so this idea to fix this might not be entirely accurate)