Skip to content
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

Re-export winit #2086

Open
junderw opened this issue Nov 13, 2023 · 1 comment
Open

Re-export winit #2086

junderw opened this issue Nov 13, 2023 · 1 comment

Comments

@junderw
Copy link

junderw commented Nov 13, 2023

There are a lot of public exposed APIs that accept and return winit types (ie):

pub fn build(self, event_loop: &winit::event_loop::EventLoop<()>) -> (winit::window::Window, Display<glutin::surface::WindowSurface>) {

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.

@est31
Copy link
Collaborator

est31 commented Nov 28, 2023

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants