Cargo Features

[dependencies]
winit = { version = "0.30.5", default-features = false, features = ["x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita", "wayland-csd-adwaita-crossfont", "wayland-csd-adwaita-notitle", "android-native-activity", "android-game-activity", "serde", "mint", "rwh_04", "rwh_05", "rwh_06"] }

Features are documented in either lib.rs or under winit::platform.

default = rwh_06, wayland, wayland-csd-adwaita, wayland-dlopen, x11

These default features are set whenever winit is added without default-features = false somewhere in the dependency tree.

x11 default = bytemuck, percent-encoding, x11-dl, x11rb

Enables x11 of xkbcommon-dl

wayland default = ahash, memmap2, sctk, wayland-backend, wayland-client, wayland-protocols, wayland-protocols-plasma
wayland-dlopen default

Enables dlopen of wayland-backend

wayland-csd-adwaita default = sctk-adwaita

Enables ab_glyph of sctk-adwaita

wayland-csd-adwaita-crossfont = sctk-adwaita

Enables crossfont of sctk-adwaita

wayland-csd-adwaita-notitle = sctk-adwaita
android-native-activity

Enables native-activity of android-activity

android-game-activity

Enables game-activity of android-activity

serde

Enables serde, serde of smol_str ^0.2.0, serde of cursor-icon and dpi

mint

Enables mint of dpi

rwh_04

Enables raw-window-handle ^0.4, rwh_04 of ndk

rwh_05

Enables raw-window-handle ^0.5.2, rwh_05 of ndk

rwh_06 default

Enables raw-window-handle, rwh_06 of ndk

Affects windows::WindowExtWindows.window_handle_any_thread

Features from optional dependencies

In crates that don't use the dep: syntax, optional dependencies automatically become Cargo features. These features may have been created by mistake, and this functionality may be removed in the future.

ahash unix not redox wasm android ios mac wayland
bytemuck unix not redox wasm android ios mac x11
memmap2 unix not redox wasm android ios mac wayland
percent-encoding unix not redox wasm android ios mac x11
sctk unix not redox wasm android ios mac wayland

Enables smithay-client-toolkit

wayland-client unix not redox wasm android ios mac wayland
wayland-protocols unix not redox wasm android ios mac wayland
wayland-protocols-plasma unix not redox wasm android ios mac wayland
x11-dl unix not redox wasm android ios mac x11
x11rb unix not redox wasm android ios mac x11
wayland-backend unix not redox wasm android ios mac wayland wayland-dlopen
sctk-adwaita unix not redox wasm android ios mac wayland-csd-adwaita wayland-csd-adwaita-crossfont? wayland-csd-adwaita-notitle?

Affects state::WinitFrame