# Copyright © SixtyFPS GmbH <info@slint-ui.com>
# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-commercial

[package]
name = "slint-interpreter"
version = "0.3.3"
authors = ["Slint Developers <info@slint-ui.com>"]
edition = "2021"
license = "GPL-3.0-only OR LicenseRef-Slint-commercial"
description = "Interpreter library for Slint"
repository = "https://github.com/slint-ui/slint"
homepage = "https://slint-ui.com"
categories = ["gui", "rendering::engine"]
keywords = ["gui", "toolkit", "graphics", "design", "ui"]
rust-version.workspace = true

[lib]
path = "lib.rs"

[features]

default = ["std", "backend-winit", "renderer-winit-femtovg", "backend-qt", "compat-0-3-0"]

## Mandatory feature:
## This feature is required to keep the compatibility with Slint 0.3.0
## Newer patch version may put current functionality behind a new feature
## that would be enabled by default only if this feature was added
"compat-0-3-0" = []
# For compatibility with 0.2
compat-0-2-0 = ["compat-0-3-0"]

## enable the [`print_diagnostics`] function to show diagnostic in the console output
display-diagnostics = ["i-slint-compiler/display-diagnostics"]

# (internal) export C++ FFI functions
ffi = ["spin_on", "i-slint-core/ffi"]

# (internal) Draw an highlight on a specified element
# NOTE: this is not a semver compatible feature
highlight = []

## Enable use of the Rust standard library.
std = ["i-slint-core/std"]

#! ### Backends

#! See the documentation of the [`slint` crate](https://docs.rs/slint/latest/slint/#backends)

## The Qt backend feature uses Qt for the windowing system integration and rendering.
## This backend also provides the `native` style.
## It requires Qt 5.15 or later to be installed. If Qt is not installed, the
## backend will not be operational
backend-qt = ["i-slint-backend-selector/i-slint-backend-qt", "std"]

## The [winit](https://crates.io/crates/log) crate is used for the event loop and windowing system integration.
## With this feature, both x11 and wayland windowing systems are supported. For a smaller build, omit
## this feature and select one of the other specific `backend-winit-XX` features.
backend-winit = ["i-slint-backend-selector/backend-winit", "std"]

## Simliar to `backend-winit` this enables the winit based event loop but only
## with support for the X Window System on Unix.
backend-winit-x11 = ["i-slint-backend-selector/backend-winit-x11", "std"]

## Simliar to `backend-winit` this enables the winit based event loop but only
## with support for the Wayland window system on Unix.
backend-winit-wayland = ["i-slint-backend-selector/backend-winit-wayland", "std"]

## Enable the `winit` backend and make it capable of renderer using the
## [femtovg](https://crates.io/crates/femtovg) crate.
renderer-winit-femtovg = ["i-slint-backend-selector/renderer-winit-femtovg", "std"]

## Enable the `winit` backend and make it capable of rendering using [Skia](https://skia.org/)
renderer-winit-skia = ["i-slint-backend-selector/renderer-winit-skia", "std"]

## Same as `renderer-winit-skia`, but Skia will always use OpenGL.
renderer-winit-skia-opengl = ["i-slint-backend-selector/renderer-winit-skia-opengl", "std"]

## Enable the `winit` backend and make it capable of rendering using the software renderer
renderer-winit-software = ["i-slint-backend-selector/renderer-winit-software"]


[dependencies]
i-slint-compiler = { version = "=0.3.3", path = "../compiler" }
i-slint-common = { version = "=0.3.3", path = "../common" }
i-slint-core = { version = "=0.3.3", path = "../core", features = ["rtti"] }
i-slint-backend-selector = { version = "=0.3.3", path = "../../internal/backends/selector", features = ["rtti"] }

vtable = { version = "0.1.6", path="../../helper_crates/vtable" }

derive_more = "0.99.5"
generativity = "1"
lyon_path = { version = "1.0" }
once_cell = "1.5"
thiserror = "1"
document-features = { version = "0.2.0", optional = true }

[dependencies.spin_on]
version = "0.1"
optional = true

[target.'cfg(target_arch = "wasm32")'.dependencies]
i-slint-backend-winit = { version = "=0.3.3", path = "../../internal/backends/winit" }

[dev-dependencies]
i-slint-backend-testing = { path = "../../internal/backends/testing" }

spin_on = "0.1"

[package.metadata.docs.rs]
features = ["display-diagnostics", "document-features"]
