478 lines
12 KiB
TOML
478 lines
12 KiB
TOML
[workspace]
|
|
members = ["dpi", "winit-*"]
|
|
resolver = "2"
|
|
|
|
[workspace.package]
|
|
edition = "2021"
|
|
license = "Apache-2.0"
|
|
repository = "https://github.com/rust-windowing/winit"
|
|
rust-version = "1.80"
|
|
|
|
[workspace.dependencies]
|
|
# Workspace dependencies.
|
|
# `winit` has no version here to allow using it in dev deps for docs.
|
|
winit = { path = "." }
|
|
winit-android = { version = "0.0.0", path = "winit-android" }
|
|
winit-core = { version = "0.0.0", path = "winit-core" }
|
|
winit-orbital = { version = "0.0.0", path = "winit-orbital" }
|
|
|
|
# Core dependencies.
|
|
bitflags = "2"
|
|
cfg_aliases = "0.2.1"
|
|
cursor-icon = "1.1.0"
|
|
dpi = { version = "0.1.2", path = "dpi" }
|
|
mint = "0.5.6"
|
|
rwh_06 = { package = "raw-window-handle", version = "0.6", features = ["std"] }
|
|
serde = { version = "1", features = ["serde_derive"] }
|
|
smol_str = "0.3"
|
|
tracing = { version = "0.1.40", default-features = false }
|
|
|
|
# Dev dependencies.
|
|
image = { version = "0.25.0", default-features = false }
|
|
softbuffer = { version = "0.4.6", default-features = false, features = [
|
|
"x11",
|
|
"x11-dlopen",
|
|
"wayland",
|
|
"wayland-dlopen",
|
|
] }
|
|
tracing-subscriber = "0.3.18"
|
|
|
|
# Android dependencies.
|
|
android-activity = "0.6.0"
|
|
ndk = { version = "0.9.0", features = ["rwh_06"], default-features = false }
|
|
|
|
# Apple dependencies.
|
|
block2 = "0.6.1"
|
|
dispatch2 = { version = "0.3.0", default-features = false, features = ["std", "objc2"] }
|
|
objc2 = "0.6.1"
|
|
objc2-app-kit = { version = "0.3.1", default-features = false }
|
|
objc2-core-foundation = { version = "0.3.1", default-features = false }
|
|
objc2-core-graphics = { version = "0.3.1", default-features = false }
|
|
objc2-core-video = { version = "0.3.1", default-features = false }
|
|
objc2-foundation = { version = "0.3.1", default-features = false }
|
|
objc2-ui-kit = { version = "0.3.1", default-features = false }
|
|
|
|
# Windows dependencies.
|
|
unicode-segmentation = "1.7.1"
|
|
windows-sys = "0.59.0"
|
|
|
|
# Linux dependencies.
|
|
ahash = { version = "0.8.7", features = ["no-rng"] }
|
|
bytemuck = { version = "1.13.1", default-features = false }
|
|
calloop = "0.13.0"
|
|
libc = "0.2.64"
|
|
memmap2 = "0.9.0"
|
|
percent-encoding = "2.0"
|
|
rustix = { version = "0.38.4", default-features = false }
|
|
sctk = { package = "smithay-client-toolkit", version = "0.19.2", default-features = false, features = [
|
|
"calloop",
|
|
] }
|
|
sctk-adwaita = { version = "0.10.1", default-features = false }
|
|
wayland-backend = { version = "0.3.10", default-features = false, features = ["client_system"] }
|
|
wayland-client = "0.31.10"
|
|
wayland-protocols = { version = "0.32.8", features = ["staging"] }
|
|
wayland-protocols-plasma = { version = "0.3.8", features = ["client"] }
|
|
x11-dl = "2.19.1"
|
|
x11rb = { version = "0.13.0", default-features = false }
|
|
xkbcommon-dl = "0.4.2"
|
|
|
|
# Orbital dependencies.
|
|
orbclient = { version = "0.3.47", default-features = false }
|
|
redox_syscall = "0.5.7"
|
|
|
|
# Web dependencies.
|
|
atomic-waker = "1"
|
|
concurrent-queue = { version = "2", default-features = false }
|
|
console_error_panic_hook = "0.1"
|
|
js-sys = "0.3.70"
|
|
pin-project = "1"
|
|
tracing-web = "0.1"
|
|
wasm-bindgen = "0.2.93"
|
|
wasm-bindgen-futures = "0.4.43"
|
|
wasm-bindgen-test = "0.3"
|
|
web-time = "1"
|
|
web_sys = { package = "web-sys", version = "0.3.70" }
|
|
|
|
##
|
|
## Top-level Winit crate.
|
|
##
|
|
[package]
|
|
authors = ["The winit contributors", "Pierre Krieger <pierre.krieger1708@gmail.com>"]
|
|
categories = ["gui"]
|
|
description = "Cross-platform window creation library."
|
|
documentation = "https://docs.rs/winit"
|
|
edition.workspace = true
|
|
include = [
|
|
"/build.rs",
|
|
"/docs",
|
|
"/examples",
|
|
"/FEATURES.md",
|
|
"/LICENSE",
|
|
"/src",
|
|
"!/src/platform_impl/web/script",
|
|
"/src/platform_impl/web/script/**/*.min.js",
|
|
"/tests",
|
|
]
|
|
keywords = ["windowing"]
|
|
license.workspace = true
|
|
name = "winit"
|
|
readme = "README.md"
|
|
repository.workspace = true
|
|
rust-version.workspace = true
|
|
version = "0.30.11"
|
|
|
|
[package.metadata.docs.rs]
|
|
features = [
|
|
"serde",
|
|
"mint",
|
|
# Enabled to get docs to compile
|
|
"android-native-activity",
|
|
]
|
|
# These are all tested in CI
|
|
rustdoc-args = ["--cfg", "docsrs"]
|
|
targets = [
|
|
# Windows
|
|
"i686-pc-windows-msvc",
|
|
"x86_64-pc-windows-msvc",
|
|
# macOS
|
|
"aarch64-apple-darwin",
|
|
"x86_64-apple-darwin",
|
|
# Unix (X11 & Wayland)
|
|
"i686-unknown-linux-gnu",
|
|
"x86_64-unknown-linux-gnu",
|
|
# iOS
|
|
"aarch64-apple-ios",
|
|
# Android
|
|
"aarch64-linux-android",
|
|
# Web
|
|
"wasm32-unknown-unknown",
|
|
]
|
|
|
|
# Features are documented in either `lib.rs` or under `winit::platform`.
|
|
[features]
|
|
default = ["x11", "wayland", "wayland-dlopen", "wayland-csd-adwaita"]
|
|
|
|
android-game-activity = ["winit-android/game-activity"]
|
|
android-native-activity = ["winit-android/native-activity"]
|
|
mint = ["dpi/mint"]
|
|
serde = [
|
|
"dep:serde",
|
|
"cursor-icon/serde",
|
|
"smol_str/serde",
|
|
"dpi/serde",
|
|
"bitflags/serde",
|
|
"winit-core/serde",
|
|
]
|
|
wayland = [
|
|
"wayland-client",
|
|
"wayland-backend",
|
|
"wayland-protocols",
|
|
"wayland-protocols-plasma",
|
|
"sctk",
|
|
"ahash",
|
|
"memmap2",
|
|
]
|
|
wayland-csd-adwaita = ["sctk-adwaita", "sctk-adwaita/ab_glyph"]
|
|
wayland-csd-adwaita-crossfont = ["sctk-adwaita", "sctk-adwaita/crossfont"]
|
|
wayland-csd-adwaita-notitle = ["sctk-adwaita"]
|
|
wayland-dlopen = ["wayland-backend/dlopen"]
|
|
x11 = ["x11-dl", "bytemuck", "percent-encoding", "xkbcommon-dl/x11", "x11rb"]
|
|
|
|
[build-dependencies]
|
|
cfg_aliases.workspace = true
|
|
|
|
[dependencies]
|
|
bitflags.workspace = true
|
|
cursor-icon.workspace = true
|
|
dpi.workspace = true
|
|
rwh_06.workspace = true
|
|
serde = { workspace = true, optional = true }
|
|
smol_str.workspace = true
|
|
tracing.workspace = true
|
|
winit-core.workspace = true
|
|
|
|
[dev-dependencies]
|
|
image = { workspace = true, features = ["png"] }
|
|
tracing = { workspace = true, features = ["log"] }
|
|
tracing-subscriber = { workspace = true, features = ["env-filter"] }
|
|
|
|
[target.'cfg(not(target_os = "android"))'.dev-dependencies]
|
|
softbuffer.workspace = true
|
|
|
|
[target.'cfg(target_os = "android")'.dependencies]
|
|
winit-android.workspace = true
|
|
|
|
# AppKit or UIKit
|
|
[target.'cfg(target_vendor = "apple")'.dependencies]
|
|
block2.workspace = true
|
|
dispatch2.workspace = true
|
|
objc2.workspace = true
|
|
|
|
# AppKit
|
|
[target.'cfg(target_os = "macos")'.dependencies]
|
|
objc2-app-kit = { workspace = true, features = [
|
|
"std",
|
|
"objc2-core-foundation",
|
|
"NSAppearance",
|
|
"NSApplication",
|
|
"NSBitmapImageRep",
|
|
"NSButton",
|
|
"NSColor",
|
|
"NSControl",
|
|
"NSCursor",
|
|
"NSDragging",
|
|
"NSEvent",
|
|
"NSGraphics",
|
|
"NSGraphicsContext",
|
|
"NSImage",
|
|
"NSImageRep",
|
|
"NSMenu",
|
|
"NSMenuItem",
|
|
"NSOpenGLView",
|
|
"NSPanel",
|
|
"NSPasteboard",
|
|
"NSResponder",
|
|
"NSRunningApplication",
|
|
"NSScreen",
|
|
"NSTextInputClient",
|
|
"NSTextInputContext",
|
|
"NSToolbar",
|
|
"NSView",
|
|
"NSWindow",
|
|
"NSWindowScripting",
|
|
"NSWindowTabGroup",
|
|
] }
|
|
objc2-core-foundation = { workspace = true, features = [
|
|
"std",
|
|
"block2",
|
|
"CFBase",
|
|
"CFCGTypes",
|
|
"CFData",
|
|
"CFRunLoop",
|
|
"CFString",
|
|
"CFUUID",
|
|
] }
|
|
objc2-core-graphics = { workspace = true, features = [
|
|
"std",
|
|
"libc",
|
|
"CGDirectDisplay",
|
|
"CGDisplayConfiguration",
|
|
"CGDisplayFade",
|
|
"CGError",
|
|
"CGRemoteOperation",
|
|
"CGWindowLevel",
|
|
] }
|
|
objc2-core-video = { workspace = true, features = [
|
|
"std",
|
|
"objc2-core-graphics",
|
|
"CVBase",
|
|
"CVReturn",
|
|
"CVDisplayLink",
|
|
] }
|
|
objc2-foundation = { workspace = true, features = [
|
|
"std",
|
|
"block2",
|
|
"objc2-core-foundation",
|
|
"NSArray",
|
|
"NSAttributedString",
|
|
"NSData",
|
|
"NSDictionary",
|
|
"NSDistributedNotificationCenter",
|
|
"NSEnumerator",
|
|
"NSGeometry",
|
|
"NSKeyValueObserving",
|
|
"NSNotification",
|
|
"NSObjCRuntime",
|
|
"NSOperation",
|
|
"NSPathUtilities",
|
|
"NSProcessInfo",
|
|
"NSRunLoop",
|
|
"NSString",
|
|
"NSThread",
|
|
"NSValue",
|
|
] }
|
|
|
|
# UIKit
|
|
[target.'cfg(all(target_vendor = "apple", not(target_os = "macos")))'.dependencies]
|
|
objc2-core-foundation = { workspace = true, features = [
|
|
"std",
|
|
"CFCGTypes",
|
|
"CFBase",
|
|
"CFRunLoop",
|
|
"CFString",
|
|
] }
|
|
objc2-foundation = { workspace = true, features = [
|
|
"std",
|
|
"block2",
|
|
"objc2-core-foundation",
|
|
"NSArray",
|
|
"NSEnumerator",
|
|
"NSGeometry",
|
|
"NSObjCRuntime",
|
|
"NSOperation",
|
|
"NSString",
|
|
"NSThread",
|
|
"NSSet",
|
|
] }
|
|
objc2-ui-kit = { workspace = true, features = [
|
|
"std",
|
|
"objc2-core-foundation",
|
|
"UIApplication",
|
|
"UIDevice",
|
|
"UIEvent",
|
|
"UIGeometry",
|
|
"UIGestureRecognizer",
|
|
"UITextInput",
|
|
"UITextInputTraits",
|
|
"UIOrientation",
|
|
"UIPanGestureRecognizer",
|
|
"UIPinchGestureRecognizer",
|
|
"UIResponder",
|
|
"UIRotationGestureRecognizer",
|
|
"UIScreen",
|
|
"UIScreenMode",
|
|
"UITapGestureRecognizer",
|
|
"UITouch",
|
|
"UITraitCollection",
|
|
"UIView",
|
|
"UIViewController",
|
|
"UIWindow",
|
|
] }
|
|
|
|
# Windows
|
|
[target.'cfg(target_os = "windows")'.dependencies]
|
|
unicode-segmentation.workspace = true
|
|
windows-sys = { workspace = true, features = [
|
|
"Win32_Devices_HumanInterfaceDevice",
|
|
"Win32_Foundation",
|
|
"Win32_Globalization",
|
|
"Win32_Graphics_Dwm",
|
|
"Win32_Graphics_Gdi",
|
|
"Win32_Media",
|
|
"Win32_System_Com_StructuredStorage",
|
|
"Win32_System_Com",
|
|
"Win32_System_LibraryLoader",
|
|
"Win32_System_Ole",
|
|
"Win32_Security",
|
|
"Win32_System_SystemInformation",
|
|
"Win32_System_SystemServices",
|
|
"Win32_System_Threading",
|
|
"Win32_System_WindowsProgramming",
|
|
"Win32_UI_Accessibility",
|
|
"Win32_UI_Controls",
|
|
"Win32_UI_HiDpi",
|
|
"Win32_UI_Input_Ime",
|
|
"Win32_UI_Input_KeyboardAndMouse",
|
|
"Win32_UI_Input_Pointer",
|
|
"Win32_UI_Input_Touch",
|
|
"Win32_UI_Shell",
|
|
"Win32_UI_TextServices",
|
|
"Win32_UI_WindowsAndMessaging",
|
|
] }
|
|
|
|
# Linux
|
|
[target.'cfg(all(unix, not(any(target_os = "redox", target_family = "wasm", target_os = "android", target_vendor = "apple"))))'.dependencies]
|
|
ahash = { workspace = true, optional = true }
|
|
bytemuck = { workspace = true, optional = true }
|
|
calloop.workspace = true
|
|
libc.workspace = true
|
|
memmap2 = { workspace = true, optional = true }
|
|
percent-encoding = { workspace = true, optional = true }
|
|
rustix = { workspace = true, features = ["std", "system", "thread", "process"] }
|
|
sctk = { workspace = true, optional = true }
|
|
sctk-adwaita = { workspace = true, optional = true }
|
|
wayland-backend = { workspace = true, optional = true }
|
|
wayland-client = { workspace = true, optional = true }
|
|
wayland-protocols = { workspace = true, optional = true }
|
|
wayland-protocols-plasma = { workspace = true, optional = true }
|
|
x11-dl = { workspace = true, optional = true }
|
|
x11rb = { workspace = true, optional = true, features = [
|
|
"allow-unsafe-code",
|
|
"cursor",
|
|
"dl-libxcb",
|
|
"randr",
|
|
"resource_manager",
|
|
"sync",
|
|
"xinput",
|
|
"xkb",
|
|
] }
|
|
xkbcommon-dl.workspace = true
|
|
|
|
[target.'cfg(target_os = "redox")'.dependencies]
|
|
winit-orbital.workspace = true
|
|
|
|
# Web
|
|
[target.'cfg(target_family = "wasm")'.dependencies]
|
|
js-sys.workspace = true
|
|
pin-project.workspace = true
|
|
wasm-bindgen.workspace = true
|
|
wasm-bindgen-futures.workspace = true
|
|
web-time.workspace = true
|
|
web_sys = { workspace = true, features = [
|
|
"AbortController",
|
|
"AbortSignal",
|
|
"Blob",
|
|
"BlobPropertyBag",
|
|
"console",
|
|
"CssStyleDeclaration",
|
|
"Document",
|
|
"DomException",
|
|
"DomRect",
|
|
"DomRectReadOnly",
|
|
"Element",
|
|
"Event",
|
|
"EventTarget",
|
|
"FocusEvent",
|
|
"HtmlCanvasElement",
|
|
"HtmlElement",
|
|
"HtmlHtmlElement",
|
|
"HtmlImageElement",
|
|
"ImageBitmap",
|
|
"ImageBitmapOptions",
|
|
"ImageBitmapRenderingContext",
|
|
"ImageData",
|
|
"IntersectionObserver",
|
|
"IntersectionObserverEntry",
|
|
"KeyboardEvent",
|
|
"MediaQueryList",
|
|
"MessageChannel",
|
|
"MessagePort",
|
|
"Navigator",
|
|
"Node",
|
|
"OrientationLockType",
|
|
"OrientationType",
|
|
"PageTransitionEvent",
|
|
"Permissions",
|
|
"PermissionState",
|
|
"PermissionStatus",
|
|
"PointerEvent",
|
|
"PremultiplyAlpha",
|
|
"ResizeObserver",
|
|
"ResizeObserverBoxOptions",
|
|
"ResizeObserverEntry",
|
|
"ResizeObserverOptions",
|
|
"ResizeObserverSize",
|
|
"Screen",
|
|
"ScreenOrientation",
|
|
"Url",
|
|
"VisibilityState",
|
|
"WheelEvent",
|
|
"Window",
|
|
"Worker",
|
|
] }
|
|
|
|
[target.'cfg(all(target_family = "wasm", target_feature = "atomics"))'.dependencies]
|
|
atomic-waker.workspace = true
|
|
concurrent-queue.workspace = true
|
|
|
|
[target.'cfg(target_family = "wasm")'.dev-dependencies]
|
|
console_error_panic_hook.workspace = true
|
|
tracing-web.workspace = true
|
|
wasm-bindgen-test.workspace = true
|
|
|
|
[[example]]
|
|
doc-scrape-examples = true
|
|
name = "window"
|
|
|
|
[[example]]
|
|
name = "child_window"
|