Closed junderw closed 2 months ago
Good point. Before, glutin did this for us, which we already export from the backend::glutin
module. From that module, we could also export the winit dependency.
Just ran into this issue myself. Not the hardest thing to diagnose, but still a little bit annoying. An API compatible re-export of the correct version of winit would be nice in the glium crate. :)
Cheers
PRs welcome!
There are tons of examples, so I find & replaced a bit... so let me know what you want to do. But I at least got something started.
There are a lot of public exposed APIs that accept and return winit types (ie):
https://github.com/glium/glium/blob/1676f0de6dddfa294f834613372f5096a429acd8/src/backend/glutin/mod.rs#L333
Also, most of the tutorials make heavy use of the winit APIs.
Currently this requires users to figure out which version of winit is currently being used, and make sure their winit dependency stays in sync with the glium dependency, otherwise it will be a breaking change if your API expects a 0.29 EventLoop when the user is still using a 0.28 EventLoop.
It seems like you are aware of this, and are bumping semver minor to signify pre-1.0.0 breaking changes whenever you bump the winit dependency to a breaking change.
Since that is already a requirement on your library, you might as well re-export winit explicitly and change the tutorials to recommend using the re-export.