softbuffer 0.4.8

Cross-platform software buffer
Documentation
[package]
name = "softbuffer"
version = "0.4.8"
edition = "2021"
license = "MIT OR Apache-2.0"
description = "Cross-platform software buffer"
documentation = "https://docs.rs/softbuffer"
readme = "README.md"
repository = "https://github.com/rust-windowing/softbuffer"
keywords = ["framebuffer", "windowing"]
categories = ["game-development", "graphics", "gui", "multimedia", "rendering"]
exclude = ["examples"]
rust-version = "1.71.0"

[[bench]]
name = "buffer_mut"
harness = false

[features]
default = ["kms", "x11", "x11-dlopen", "wayland", "wayland-dlopen"]
kms = ["bytemuck", "drm", "rustix"]
wayland = [
    "wayland-backend",
    "wayland-client",
    "wayland-sys",
    "memmap2",
    "rustix",
    "fastrand",
]
wayland-dlopen = ["wayland-sys/dlopen"]
x11 = [
    "as-raw-xcb-connection",
    "bytemuck",
    "fastrand",
    "rustix",
    "tiny-xlib",
    "x11rb",
]
x11-dlopen = ["tiny-xlib/dlopen", "x11rb/dl-libxcb"]

[dependencies]
raw_window_handle = { package = "raw-window-handle", version = "0.6", features = [
    "std",
] }
tracing = { version = "0.1.41", default-features = false }

[target.'cfg(target_os = "android")'.dependencies]
bytemuck = "1.12.3"
ndk = "0.9.0"

[target.'cfg(not(any(target_os = "android", target_vendor = "apple", target_os = "redox", target_family = "wasm", target_os = "windows")))'.dependencies]
as-raw-xcb-connection = { version = "1.0.0", optional = true }
bytemuck = { version = "1.12.3", optional = true }
drm = { version = "0.14.1", default-features = false, optional = true }
fastrand = { version = "2.0.0", optional = true }
memmap2 = { version = "0.9.0", optional = true }
rustix = { version = "1.0.1", features = [
    "fs",
    "mm",
    "shm",
    "std",
], default-features = false, optional = true }
tiny-xlib = { version = "0.2.1", optional = true }
wayland-backend = { version = "0.3.0", features = [
    "client_system",
], optional = true }
wayland-client = { version = "0.31.0", optional = true }
wayland-sys = { version = "0.31.0", optional = true }
x11rb = { version = "0.13.0", features = [
    "allow-unsafe-code",
    "shm",
], optional = true }

[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.61.2"
features = [
    "Win32_Graphics_Gdi",
    "Win32_UI_Shell",
    "Win32_UI_WindowsAndMessaging",
    "Win32_Foundation",
]

[target.'cfg(target_vendor = "apple")'.dependencies]
objc2-core-graphics = { version = "0.3.2", default-features = false, features = [
    "std",
    "objc2",
    "CGColorSpace",
    "CGDataProvider",
    "CGImage",
] }
objc2 = "0.6.0"
objc2-core-foundation = { version = "0.3.2", default-features = false, features = [
    "std",
    "CFCGTypes",
] }
objc2-foundation = { version = "0.3.2", default-features = false, features = [
    "std",
    "objc2-core-foundation",
    "NSDictionary",
    "NSGeometry",
    "NSKeyValueObserving",
    "NSString",
    "NSThread",
    "NSValue",
] }
objc2-quartz-core = { version = "0.3.2", default-features = false, features = [
    "std",
    "objc2-core-foundation",
    "CALayer",
    "CATransaction",
] }

[target.'cfg(target_family = "wasm")'.dependencies]
js-sys = "0.3.63"
wasm-bindgen = "0.2.86"

[target.'cfg(target_family = "wasm")'.dependencies.web-sys]
version = "0.3.55"
features = [
    "CanvasRenderingContext2d",
    "Document",
    "Element",
    "HtmlCanvasElement",
    "ImageData",
    "OffscreenCanvas",
    "OffscreenCanvasRenderingContext2d",
    "Window",
]

[target.'cfg(target_os = "redox")'.dependencies]
redox_syscall = "0.5"

[dev-dependencies]
colorous = "1.0.12"
criterion = { version = "0.8.1", default-features = false, features = [
    "cargo_bench_support",
] }
web-time = "1.0.0"
winit = "0.30.0"

[target.'cfg(target_os = "android")'.dev-dependencies]
winit = { version = "0.30.0", features = ["android-native-activity"] }
android-activity = "0.6"

[dev-dependencies.image]
version = "0.25.0"
# Disable rayon on web
default-features = false
features = ["jpeg"]

[target.'cfg(not(target_family = "wasm"))'.dev-dependencies]
# Turn rayon back on everywhere else; creating the separate entry resets the features to default.
rayon = "1.5.1"

[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen-test = "0.3"

[target.'cfg(not(any(target_os = "android", target_vendor = "apple", target_os = "redox", target_family = "wasm", target_os = "windows")))'.dev-dependencies]
rustix = { version = "1.0.1", features = ["event"] }

[workspace]
members = ["run-wasm"]

[[example]]
# Run with `cargo apk r --example winit_android`
name = "winit_android"
crate-type = ["cdylib"]

[[example]]
# Run with `cargo apk r --example winit_multithread_android`
name = "winit_multithread_android"
crate-type = ["cdylib"]

[package.metadata.docs.rs]
all-features = true
rustdoc-args = ["--cfg", "docsrs"]
default-target = "x86_64-unknown-linux-gnu"
targets = [
    "x86_64-pc-windows-msvc",
    "x86_64-apple-darwin",
    "x86_64-unknown-linux-gnu",
    "wasm32-unknown-unknown",
]