# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0

[package]
name = "i-slint-renderer-femtovg"
description = "FemtoVG based renderer for Slint"
authors.workspace = true
edition = "2024"
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true

[lib]
path = "lib.rs"

[features]
default = []
opengl = []
# wgpu-28 enables the wgpu backend for internal use (e.g. linuxkms DRM rendering).
# unstable-wgpu-28 additionally exposes public API integration (GraphicsAPI, texture import).
wgpu = ["wgpu-28"]
wgpu-28 = ["dep:wgpu-28", "femtovg/wgpu", "i-slint-core/wgpu-28"]
unstable-wgpu-27 = []
unstable-wgpu-28 = ["wgpu-28", "i-slint-core/unstable-wgpu-28"]

[dependencies]
i-slint-core = { workspace = true, features = ["default", "box-shadow-cache", "shared-fontique", "shared-parley"] }
i-slint-core-macros = { workspace = true, features = ["default"] }
i-slint-common = { workspace = true, features = ["default", "shared-fontique"] }

const-field-offset = { version = "0.2", path = "../../../helper_crates/const-field-offset" }

cfg-if = "1"
derive_more = { workspace = true }
lyon_path = { workspace = true }
pin-weak = "1"
femtovg = { version = "0.23.2", default-features = false, features = ["swash"] }
imgref = { version = "1.6.1" }
rgb = { version = "0.8.27" }

glow = { workspace = true }

wgpu-28 = { workspace = true, optional = true, default-features = true }

[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true, features = ["console", "WebGlContextAttributes", "CanvasRenderingContext2d", "HtmlInputElement", "HtmlCanvasElement", "Window", "Document"] }
wasm-bindgen = { version = "0.2" }

[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(slint_nightly_test)"] }

[package.metadata.docs.rs]
rustdoc-args = ["--generate-link-to-definition"]
