[package]
name = "softbuffer"
version = "0.3.0"
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.64.0"
[[bench]]
name = "buffer_mut"
harness = false
[features]
default = ["x11", "wayland", "wayland-dlopen"]
wayland = ["wayland-backend", "wayland-client", "memmap2", "nix", "fastrand"]
wayland-dlopen = ["wayland-sys/dlopen"]
x11 = ["bytemuck", "nix", "x11rb", "x11-dl"]
[dependencies]
log = "0.4.17"
raw-window-handle = "0.5.0"
[target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox"))))'.dependencies]
bytemuck = { version = "1.12.3", optional = true }
memmap2 = { version = "0.6.1", optional = true }
nix = { version = "0.26.1", optional = true }
wayland-backend = { version = "0.1.0", features = ["client_system"], optional = true }
wayland-client = { version = "0.30.0", optional = true }
wayland-sys = "0.30.0"
x11-dl = { version = "2.19.1", optional = true }
x11rb = { version = "0.12.0", features = ["allow-unsafe-code", "dl-libxcb", "shm"], optional = true }
[target.'cfg(all(unix, not(any(target_vendor = "apple", target_os = "android", target_os = "redox", target_os = "linux", target_os = "freebsd"))))'.dependencies]
fastrand = { version = "1.8.0", optional = true }
[target.'cfg(target_os = "windows")'.dependencies.windows-sys]
version = "0.48.0"
features = ["Win32_Graphics_Gdi", "Win32_UI_WindowsAndMessaging", "Win32_Foundation"]
[target.'cfg(target_os = "macos")'.dependencies]
bytemuck = { version = "1.12.3", features = ["extern_crate_alloc"] }
cocoa = "0.24.0"
core-graphics = "0.22.3"
foreign-types = "0.3.0"
objc = "0.2.7"
[target.'cfg(target_arch = "wasm32")'.dependencies]
js-sys = "0.3.55"
wasm-bindgen = "0.2.78"
[target.'cfg(target_arch = "wasm32")'.dependencies.web-sys]
version = "0.3.55"
features = ["CanvasRenderingContext2d", "Document", "Element", "HtmlCanvasElement", "ImageData", "Window"]
[target.'cfg(target_os = "redox")'.dependencies]
redox_syscall = "0.3"
[build-dependencies]
cfg_aliases = "0.1.1"
[dev-dependencies]
criterion = { version = "0.4.0", default-features = false, features = ["cargo_bench_support"] }
instant = "0.1.12"
winit = "0.28.1"
winit-test = "0.1.0"
[dev-dependencies.image]
version = "0.24.6"
default-features = false
features = ["jpeg"]
[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
image = "0.24.6"
rayon = "1.5.1"
[target.'cfg(target_arch = "wasm32")'.dev-dependencies]
wasm-bindgen-test = "0.3"
[workspace]
members = [
"run-wasm",
]
[[test]]
name = "present_and_fetch"
path = "tests/present_and_fetch.rs"
harness = false
[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",
]