# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT

[workspace]

[package]
name = "servo-example"
version = "1.16.0"
authors = ["Slint Developers <info@slint.dev>"]
edition = "2024"
publish = false
license = "MIT"
build = "build.rs"
description = "Slint Servo Integration Example"

[lib]
name = "servo_example_lib"
path = "src/lib.rs"
crate-type = ["rlib", "cdylib"]

[[bin]]
name = "servo_example"
path = "src/main.rs"

[dependencies]
gl = "0.14.0"
url = "2.5.7"
log = "0.4.28"
smol = "2.0.2"
glow = "0.16.0"
gleam = "0.15.1"
image = "0.25.8"
winit = "0.30.12"
spin_on = "0.1.1"
rustls = "0.23.34"
euclid = "0.22.11"
time-now = "0.1.2"
termcolor = "1.4.1"
thiserror = "2.0.17"
foreign-types-shared = "0.3.1"

wgpu-hal = "28.0.0"
wgpu-core = "28.0.0"
wgpu = { version = "28.0.0", features = ["metal"] }

surfman = { version = "0.11.0", features = ["chains"] }
servo = "0.1.0"

[target.'cfg(any(target_os = "linux", target_os = "android"))'.dependencies]
ash = "0.38.0"

[target.'cfg(target_os = "android")'.dependencies]
slint = { path = "../../api/rs/slint", features = ["backend-android-activity-06", "unstable-wgpu-28"] }

[target.'cfg(not(target_os = "android"))'.dependencies]
slint = { path = "../../api/rs/slint", features = ["unstable-winit-030", "unstable-wgpu-28", "renderer-femtovg-wgpu"] }

[target.'cfg(target_vendor = "apple")'.dependencies]
metal = "0.33.0"
objc2 = "0.6.3"
objc2-io-surface = "0.3.2"
objc2-foundation = "0.3.2"
objc2-metal = { version = "0.3.2", features = ["MTLDevice", "MTLAllocation", "MTLResource", "MTLTexture", "objc2-io-surface"] }

[build-dependencies]
# need to add to for all host to generate gl_bindings for android
gl_generator = "0.14.0"
slint-build = { path = "../../api/rs/build" }

[[package.metadata.android.uses_permission]]
name = "android.permission.INTERNET"
