[package]
name = "app-surface"
authors = ["jinleili"]
description = "Integrate wgpu into your existing iOS, Android and Web apps without relying on winit."
edition.workspace = true
version = "1.12.0"
rust-version.workspace = true
repository = "https://github.com/jinleili/wgpu-in-app"
keywords = ["android", "SurfaceView", "CAMetalLayer", "Canvas", "wgpu"]
license = "MIT"

[lib]
#crate-type = ["rlib"]

[features]
default = ["winit"]
cargo-clippy = []
webgl = ["wgpu/webgl"]
mac_catalyst = []
winit = ["dep:winit"]
# Use (Canvas || OffscreenCanvas) && `raw-window-handle` directly on the web, no need for winit
web_rwh = []

[dependencies]
log.workspace = true
glam = { workspace = true, features = ["bytemuck"] }
wgpu.workspace = true
web-sys = { workspace = true, features = [
    "Document",
    "Window",
    "Location",
    "HtmlCanvasElement",
    "OffscreenCanvas",
], optional = true }
wasm-bindgen = { workspace = true, optional = true }
winit = { workspace = true, optional = true }

[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
futures-lite.workspace = true

[target.'cfg(target_vendor = "apple")'.dependencies]
libc.workspace = true
env_logger.workspace = true
raw-window-handle.workspace = true
objc2.workspace = true
objc2-core-foundation.workspace = true
objc2-foundation.workspace = true

[target.'cfg(target_os = "android")'.dependencies]
android_logger.workspace = true
jni.workspace = true
ndk-sys.workspace = true
raw-window-handle.workspace = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true }
wasm-bindgen.workspace = true
raw-window-handle.workspace = true
