Adding winit library as a dependency

Run this command in a terminal, in your project's directory:

cargo add winit

To add it manually, edit your project's Cargo.toml file and add to the [dependencies] section:

winit = "0.31.0-beta.2"

The winit library will be automatically available globally. Read the winit library documentation.

Back to the crate overview.