# 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-backend-testing"
description = "Testing backend for Slint"
authors.workspace = true
edition.workspace = true
homepage.workspace = true
license.workspace = true
repository.workspace = true
rust-version.workspace = true
version.workspace = true
build = "build.rs"

[lib]
path = "lib.rs"

[features]
# Internal feature that is only enabled for Slint's own tests
internal = ["include_dir"]
# ffi for C++ bindings
ffi = []
system-testing = [
  "prost",
  "pbjson",
  "serde",
  "generational-arena",
  "async-net",
  "futures-lite",
  "byteorder",
  "image",
  "prost-build",
  "prost-types",
  "pbjson-build",
  "protox",
]
mcp = [
  "prost",
  "pbjson",
  "serde",
  "serde_json",
  "generational-arena",
  "async-net",
  "futures-lite",
  "image",
  "base64",
  "httparse",
  "prost-build",
  "prost-types",
  "pbjson-build",
  "protox",
]

[dependencies]
i-slint-core = { workspace = true, features = ["std", "shared-parley"] }
i-slint-common = { workspace = true, features = ["shared-fontique"] }
vtable = { workspace = true }
prost = { version = "0.14", optional = true }
pbjson = { version = "0.9", optional = true }
serde = { version = "1", optional = true }
serde_json = { workspace = true, optional = true }
base64 = { version = "0.22", optional = true }
httparse = { version = "1", optional = true }
generational-arena = { version = "0.2.9", optional = true }
async-net = { version = "2.0.0", optional = true }
futures-lite = { version = "2.3.0", optional = true }
byteorder = { version = "1.5.0", optional = true }
image = { workspace = true, optional = true, features = ["png"] }
include_dir = { version = "0.7", optional = true }

[build-dependencies]
prost = { version = "0.14", optional = true }
prost-build = { version = "0.14", optional = true }
prost-types = { version = "0.14", optional = true }
pbjson-build = { version = "0.9", optional = true }
protox = { version = "0.9", optional = true }

[dev-dependencies]
slint = { path = "../../../api/rs/slint", default-features = false, features = ["std", "compat-1-2"] }
i-slint-core-macros = { path = "../../core-macros" }
i-slint-common = { path = "../../common" }

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