| 1 | [package] |
| 2 | name = "winit" |
| 3 | version = "0.30.9" |
| 4 | authors = [ |
| 5 | "The winit contributors" , |
| 6 | "Pierre Krieger <pierre.krieger1708@gmail.com>" , |
| 7 | ] |
| 8 | description = "Cross-platform window creation library." |
| 9 | keywords = ["windowing" ] |
| 10 | readme = "README.md" |
| 11 | documentation = "https://docs.rs/winit" |
| 12 | categories = ["gui" ] |
| 13 | rust-version.workspace = true |
| 14 | repository.workspace = true |
| 15 | license.workspace = true |
| 16 | edition.workspace = true |
| 17 | include = [ |
| 18 | "/build.rs" , |
| 19 | "/docs" , |
| 20 | "/examples" , |
| 21 | "/FEATURES.md" , |
| 22 | "/LICENSE" , |
| 23 | "/src" , |
| 24 | "!/src/platform_impl/web/script" , |
| 25 | "/src/platform_impl/web/script/**/*.min.js" , |
| 26 | "/tests" , |
| 27 | ] |
| 28 | |
| 29 | [package.metadata.docs.rs] |
| 30 | features = [ |
| 31 | "rwh_04" , |
| 32 | "rwh_05" , |
| 33 | "rwh_06" , |
| 34 | "serde" , |
| 35 | "mint" , |
| 36 | # Enabled to get docs to compile |
| 37 | "android-native-activity" , |
| 38 | ] |
| 39 | # These are all tested in CI |
| 40 | targets = [ |
| 41 | # Windows |
| 42 | "i686-pc-windows-msvc" , |
| 43 | "x86_64-pc-windows-msvc" , |
| 44 | # macOS |
| 45 | "x86_64-apple-darwin" , |
| 46 | # Unix (X11 & Wayland) |
| 47 | "i686-unknown-linux-gnu" , |
| 48 | "x86_64-unknown-linux-gnu" , |
| 49 | # iOS |
| 50 | "x86_64-apple-ios" , |
| 51 | # Android |
| 52 | "aarch64-linux-android" , |
| 53 | # Web |
| 54 | "wasm32-unknown-unknown" , |
| 55 | ] |
| 56 | rustdoc-args = ["--cfg" , "docsrs" ] |
| 57 | |
| 58 | # Features are documented in either `lib.rs` or under `winit::platform`. |
| 59 | [features] |
| 60 | default = ["rwh_06" , "x11" , "wayland" , "wayland-dlopen" , "wayland-csd-adwaita" ] |
| 61 | x11 = ["x11-dl" , "bytemuck" , "percent-encoding" , "xkbcommon-dl/x11" , "x11rb" ] |
| 62 | wayland = [ |
| 63 | "wayland-client" , |
| 64 | "wayland-backend" , |
| 65 | "wayland-protocols" , |
| 66 | "wayland-protocols-plasma" , |
| 67 | "sctk" , |
| 68 | "ahash" , |
| 69 | "memmap2" , |
| 70 | ] |
| 71 | wayland-dlopen = ["wayland-backend/dlopen" ] |
| 72 | wayland-csd-adwaita = ["sctk-adwaita" , "sctk-adwaita/ab_glyph" ] |
| 73 | wayland-csd-adwaita-crossfont = ["sctk-adwaita" , "sctk-adwaita/crossfont" ] |
| 74 | wayland-csd-adwaita-notitle = ["sctk-adwaita" ] |
| 75 | android-native-activity = ["android-activity/native-activity" ] |
| 76 | android-game-activity = ["android-activity/game-activity" ] |
| 77 | serde = ["dep:serde" , "cursor-icon/serde" , "smol_str/serde" , "dpi/serde" ] |
| 78 | mint = ["dpi/mint" ] |
| 79 | rwh_04 = ["dep:rwh_04" , "ndk/rwh_04" ] |
| 80 | rwh_05 = ["dep:rwh_05" , "ndk/rwh_05" ] |
| 81 | rwh_06 = ["dep:rwh_06" , "ndk/rwh_06" ] |
| 82 | |
| 83 | [build-dependencies] |
| 84 | cfg_aliases = "0.2.1" |
| 85 | |
| 86 | [dependencies] |
| 87 | bitflags = "2" |
| 88 | cursor-icon = "1.1.0" |
| 89 | dpi = { version = "0.1.1" , path = "dpi" } |
| 90 | rwh_04 = { package = "raw-window-handle" , version = "0.4" , optional = true } |
| 91 | rwh_05 = { package = "raw-window-handle" , version = "0.5.2" , features = [ |
| 92 | "std" , |
| 93 | ], optional = true } |
| 94 | rwh_06 = { package = "raw-window-handle" , version = "0.6" , features = [ |
| 95 | "std" , |
| 96 | ], optional = true } |
| 97 | serde = { workspace = true, optional = true } |
| 98 | smol_str = "0.2.0" |
| 99 | tracing = { version = "0.1.40" , default-features = false } |
| 100 | |
| 101 | [dev-dependencies] |
| 102 | image = { version = "0.25.0" , default-features = false, features = ["png" ] } |
| 103 | tracing = { version = "0.1.40" , default-features = false, features = ["log" ] } |
| 104 | tracing-subscriber = { version = "0.3.18" , features = ["env-filter" ] } |
| 105 | winit = { path = "." , features = ["rwh_05" ] } |
| 106 | |
| 107 | [target.'cfg(not(any(target_os = "android", target_os = "ios")))'.dev-dependencies] |
| 108 | softbuffer = { version = "0.4.0" , default-features = false, features = [ |
| 109 | "x11" , |
| 110 | "x11-dlopen" , |
| 111 | "wayland" , |
| 112 | "wayland-dlopen" , |
| 113 | ] } |
| 114 | |
| 115 | [target.'cfg(target_os = "android")'.dependencies] |
| 116 | android-activity = "0.6.0" |
| 117 | ndk = { version = "0.9.0" , default-features = false } |
| 118 | |
| 119 | [target.'cfg(any(target_os = "ios", target_os = "macos"))'.dependencies] |
| 120 | core-foundation = "0.9.3" |
| 121 | objc2 = "0.5.2" |
| 122 | |
| 123 | [target.'cfg(target_os = "macos")'.dependencies] |
| 124 | core-graphics = "0.23.1" |
| 125 | block2 = "0.5.1" |
| 126 | |
| 127 | [target.'cfg(target_os = "macos")'.dependencies.objc2-foundation] |
| 128 | version = "0.2.2" |
| 129 | features = [ |
| 130 | "block2" , |
| 131 | "dispatch" , |
| 132 | "NSArray" , |
| 133 | "NSAttributedString" , |
| 134 | "NSData" , |
| 135 | "NSDictionary" , |
| 136 | "NSDistributedNotificationCenter" , |
| 137 | "NSEnumerator" , |
| 138 | "NSKeyValueObserving" , |
| 139 | "NSNotification" , |
| 140 | "NSObjCRuntime" , |
| 141 | "NSPathUtilities" , |
| 142 | "NSProcessInfo" , |
| 143 | "NSRunLoop" , |
| 144 | "NSString" , |
| 145 | "NSThread" , |
| 146 | "NSValue" , |
| 147 | ] |
| 148 | |
| 149 | [target.'cfg(target_os = "macos")'.dependencies.objc2-app-kit] |
| 150 | version = "0.2.2" |
| 151 | features = [ |
| 152 | "NSAppearance" , |
| 153 | "NSApplication" , |
| 154 | "NSBitmapImageRep" , |
| 155 | "NSButton" , |
| 156 | "NSColor" , |
| 157 | "NSControl" , |
| 158 | "NSCursor" , |
| 159 | "NSDragging" , |
| 160 | "NSEvent" , |
| 161 | "NSGraphics" , |
| 162 | "NSGraphicsContext" , |
| 163 | "NSImage" , |
| 164 | "NSImageRep" , |
| 165 | "NSMenu" , |
| 166 | "NSMenuItem" , |
| 167 | "NSOpenGLView" , |
| 168 | "NSPasteboard" , |
| 169 | "NSResponder" , |
| 170 | "NSRunningApplication" , |
| 171 | "NSScreen" , |
| 172 | "NSTextInputClient" , |
| 173 | "NSTextInputContext" , |
| 174 | "NSView" , |
| 175 | "NSWindow" , |
| 176 | "NSWindowScripting" , |
| 177 | "NSWindowTabGroup" , |
| 178 | ] |
| 179 | |
| 180 | [target.'cfg(target_os = "ios")'.dependencies.objc2-foundation] |
| 181 | version = "0.2.2" |
| 182 | features = [ |
| 183 | "dispatch" , |
| 184 | "NSArray" , |
| 185 | "NSEnumerator" , |
| 186 | "NSGeometry" , |
| 187 | "NSObjCRuntime" , |
| 188 | "NSString" , |
| 189 | "NSProcessInfo" , |
| 190 | "NSThread" , |
| 191 | "NSSet" , |
| 192 | ] |
| 193 | |
| 194 | [target.'cfg(target_os = "ios")'.dependencies.objc2-ui-kit] |
| 195 | version = "0.2.2" |
| 196 | features = [ |
| 197 | "UIApplication" , |
| 198 | "UIDevice" , |
| 199 | "UIEvent" , |
| 200 | "UIGeometry" , |
| 201 | "UIGestureRecognizer" , |
| 202 | "UITextInput" , |
| 203 | "UITextInputTraits" , |
| 204 | "UIOrientation" , |
| 205 | "UIPanGestureRecognizer" , |
| 206 | "UIPinchGestureRecognizer" , |
| 207 | "UIResponder" , |
| 208 | "UIRotationGestureRecognizer" , |
| 209 | "UIScreen" , |
| 210 | "UIScreenMode" , |
| 211 | "UITapGestureRecognizer" , |
| 212 | "UITouch" , |
| 213 | "UITraitCollection" , |
| 214 | "UIView" , |
| 215 | "UIViewController" , |
| 216 | "UIWindow" , |
| 217 | ] |
| 218 | |
| 219 | [target.'cfg(target_os = "windows")'.dependencies] |
| 220 | unicode-segmentation = "1.7.1" |
| 221 | |
| 222 | [target.'cfg(target_os = "windows")'.dependencies.windows-sys] |
| 223 | version = "0.52.0" |
| 224 | features = [ |
| 225 | "Win32_Devices_HumanInterfaceDevice" , |
| 226 | "Win32_Foundation" , |
| 227 | "Win32_Globalization" , |
| 228 | "Win32_Graphics_Dwm" , |
| 229 | "Win32_Graphics_Gdi" , |
| 230 | "Win32_Media" , |
| 231 | "Win32_System_Com_StructuredStorage" , |
| 232 | "Win32_System_Com" , |
| 233 | "Win32_System_LibraryLoader" , |
| 234 | "Win32_System_Ole" , |
| 235 | "Win32_Security" , |
| 236 | "Win32_System_SystemInformation" , |
| 237 | "Win32_System_SystemServices" , |
| 238 | "Win32_System_Threading" , |
| 239 | "Win32_System_WindowsProgramming" , |
| 240 | "Win32_UI_Accessibility" , |
| 241 | "Win32_UI_Controls" , |
| 242 | "Win32_UI_HiDpi" , |
| 243 | "Win32_UI_Input_Ime" , |
| 244 | "Win32_UI_Input_KeyboardAndMouse" , |
| 245 | "Win32_UI_Input_Pointer" , |
| 246 | "Win32_UI_Input_Touch" , |
| 247 | "Win32_UI_Shell" , |
| 248 | "Win32_UI_TextServices" , |
| 249 | "Win32_UI_WindowsAndMessaging" , |
| 250 | ] |
| 251 | |
| 252 | [target.'cfg(all(unix, not(any(target_os = "redox", target_family = "wasm", target_os = "android", target_os = "ios", target_os = "macos"))))'.dependencies] |
| 253 | ahash = { version = "0.8.7" , features = ["no-rng" ], optional = true } |
| 254 | bytemuck = { version = "1.13.1" , default-features = false, optional = true } |
| 255 | calloop = "0.13.0" |
| 256 | libc = "0.2.64" |
| 257 | memmap2 = { version = "0.9.0" , optional = true } |
| 258 | percent-encoding = { version = "2.0" , optional = true } |
| 259 | rustix = { version = "0.38.4" , default-features = false, features = [ |
| 260 | "std" , |
| 261 | "system" , |
| 262 | "thread" , |
| 263 | "process" , |
| 264 | ] } |
| 265 | sctk = { package = "smithay-client-toolkit" , version = "0.19.2" , default-features = false, features = [ |
| 266 | "calloop" , |
| 267 | ], optional = true } |
| 268 | sctk-adwaita = { version = "0.10.1" , default-features = false, optional = true } |
| 269 | wayland-backend = { version = "0.3.5" , default-features = false, features = [ |
| 270 | "client_system" , |
| 271 | ], optional = true } |
| 272 | wayland-client = { version = "0.31.4" , optional = true } |
| 273 | wayland-protocols = { version = "0.32.2" , features = [ |
| 274 | "staging" , |
| 275 | ], optional = true } |
| 276 | wayland-protocols-plasma = { version = "0.3.2" , features = [ |
| 277 | "client" , |
| 278 | ], optional = true } |
| 279 | x11-dl = { version = "2.19.1" , optional = true } |
| 280 | x11rb = { version = "0.13.0" , default-features = false, features = [ |
| 281 | "allow-unsafe-code" , |
| 282 | "dl-libxcb" , |
| 283 | "randr" , |
| 284 | "resource_manager" , |
| 285 | "xinput" , |
| 286 | "xkb" , |
| 287 | ], optional = true } |
| 288 | xkbcommon-dl = "0.4.2" |
| 289 | |
| 290 | [target.'cfg(target_os = "redox")'.dependencies] |
| 291 | orbclient = { version = "0.3.47" , default-features = false } |
| 292 | redox_syscall = "0.4.1" |
| 293 | |
| 294 | [target.'cfg(target_family = "wasm")'.dependencies] |
| 295 | js-sys = "0.3.70" |
| 296 | pin-project = "1" |
| 297 | wasm-bindgen = "0.2.93" |
| 298 | wasm-bindgen-futures = "0.4.43" |
| 299 | web-time = "1" |
| 300 | web_sys = { package = "web-sys" , version = "0.3.70" , features = [ |
| 301 | "AbortController" , |
| 302 | "AbortSignal" , |
| 303 | "Blob" , |
| 304 | "BlobPropertyBag" , |
| 305 | "console" , |
| 306 | "CssStyleDeclaration" , |
| 307 | "Document" , |
| 308 | "DomException" , |
| 309 | "DomRect" , |
| 310 | "DomRectReadOnly" , |
| 311 | "Element" , |
| 312 | "Event" , |
| 313 | "EventTarget" , |
| 314 | "FocusEvent" , |
| 315 | "HtmlCanvasElement" , |
| 316 | "HtmlElement" , |
| 317 | "HtmlImageElement" , |
| 318 | "ImageBitmap" , |
| 319 | "ImageBitmapOptions" , |
| 320 | "ImageBitmapRenderingContext" , |
| 321 | "ImageData" , |
| 322 | "IntersectionObserver" , |
| 323 | "IntersectionObserverEntry" , |
| 324 | "KeyboardEvent" , |
| 325 | "MediaQueryList" , |
| 326 | "MessageChannel" , |
| 327 | "MessagePort" , |
| 328 | "Navigator" , |
| 329 | "Node" , |
| 330 | "OrientationLockType" , |
| 331 | "OrientationType" , |
| 332 | "PageTransitionEvent" , |
| 333 | "Permissions" , |
| 334 | "PermissionState" , |
| 335 | "PermissionStatus" , |
| 336 | "PointerEvent" , |
| 337 | "PremultiplyAlpha" , |
| 338 | "ResizeObserver" , |
| 339 | "ResizeObserverBoxOptions" , |
| 340 | "ResizeObserverEntry" , |
| 341 | "ResizeObserverOptions" , |
| 342 | "ResizeObserverSize" , |
| 343 | "Screen" , |
| 344 | "ScreenOrientation" , |
| 345 | "Url" , |
| 346 | "VisibilityState" , |
| 347 | "WheelEvent" , |
| 348 | "Window" , |
| 349 | "Worker" , |
| 350 | ] } |
| 351 | |
| 352 | [target.'cfg(all(target_family = "wasm", target_feature = "atomics"))'.dependencies] |
| 353 | atomic-waker = "1" |
| 354 | concurrent-queue = { version = "2" , default-features = false } |
| 355 | |
| 356 | [target.'cfg(target_family = "wasm")'.dev-dependencies] |
| 357 | console_error_panic_hook = "0.1" |
| 358 | tracing-web = "0.1" |
| 359 | |
| 360 | [[example]] |
| 361 | doc-scrape-examples = true |
| 362 | name = "window" |
| 363 | |
| 364 | [workspace] |
| 365 | resolver = "2" |
| 366 | members = ["dpi" ] |
| 367 | |
| 368 | [workspace.package] |
| 369 | rust-version = "1.70.0" |
| 370 | repository = "https://github.com/rust-windowing/winit" |
| 371 | license = "Apache-2.0" |
| 372 | edition = "2021" |
| 373 | |
| 374 | [workspace.dependencies] |
| 375 | serde = { version = "1" , features = ["serde_derive" ] } |
| 376 | mint = "0.5.6" |
| 377 | |