# 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 = "slint-node"
description = "Internal Slint Runtime Library for NodeJS API."
authors = ["Slint Developers <info@slint.dev>"]
documentation = "https://slint.dev/docs"
edition = "2024"
homepage = "https://slint.dev"
keywords = ["gui", "toolkit", "graphics", "design", "ui"]
license = "GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0"
repository = "https://github.com/slint-ui/slint"
rust-version = "1.92"
version = "1.17.1"
categories = ["gui", "development-tools"]
build = "build.rs"
publish = false

[lib]
crate-type = ["cdylib"]
path = "rust/lib.rs"

[features]
# Keep in sync with features in nightly_snapshot.yaml, cpp_package.yaml, slint_tool_binary.yaml, and api/python/slint/Cargo.toml
default = ["backend-linuxkms-noseat", "backend-winit", "renderer-femtovg", "renderer-skia", "accessibility"]

backend-qt = ["slint-interpreter/backend-qt"]
backend-winit = ["slint-interpreter/backend-winit"]
backend-winit-x11 = ["slint-interpreter/backend-winit-x11"]
backend-winit-wayland = ["slint-interpreter/backend-winit-wayland"]
backend-linuxkms = ["slint-interpreter/backend-linuxkms"]
backend-linuxkms-noseat = ["slint-interpreter/backend-linuxkms-noseat"]
renderer-femtovg = ["slint-interpreter/renderer-femtovg"]
renderer-femtovg-wgpu = ["slint-interpreter/renderer-femtovg-wgpu"]
renderer-skia = ["slint-interpreter/renderer-skia"]
renderer-skia-opengl = ["slint-interpreter/renderer-skia-opengl"]
renderer-skia-vulkan = ["slint-interpreter/renderer-skia-vulkan"]
renderer-software = ["slint-interpreter/renderer-software"]
accessibility = ["slint-interpreter/accessibility"]

# The features below are additive and binary-compatible with the default build:
# they don't change the napi surface, only enabling extra runtime behavior. They
# depend on the unpublished i-slint-backend-testing crate.
#
# `system-testing` and `mcp` (the auto-started system-testing/MCP servers via the
# backend selector) are what the shipped "dev" binary enables (slint-ui-dev, see
# binaries-dev.json); `build:debug` builds that same binary locally. `testing`
# (mocked time and synthetic input) is independent: it is enabled by
# `build:testing` for this crate's own unit tests and is not part of the dev
# binary.
testing = ["dep:i-slint-backend-testing"]
system-testing = ["dep:i-slint-backend-testing", "i-slint-backend-selector/system-testing"]
mcp = ["dep:i-slint-backend-testing", "i-slint-backend-selector/mcp"]

[dependencies]
napi = { version = "3", default-features = false, features = ["napi8"] }
napi-derive = "3"
i-slint-compiler = { features = ["default"] , version = "=1.17.1", default-features = false }
i-slint-core = { features = ["default", "gettext-rs"] , version = "=1.17.1", default-features = false }
i-slint-backend-selector = { version = "=1.17.1", default-features = false }
slint-interpreter = { default-features = false , features = ["display-diagnostics", "internal", "compat-1-2", "system-tray"] , version = "=1.17.1"}
spin_on = { version = "0.1" }
css-color-parser2 = { version = "1.0.1" }
itertools = { version = "0.14" }
send_wrapper = { version = "0.6.0" }
# Removed by node_package xtask
i-slint-backend-testing = { optional = true, features = ["internal"] , version = "=1.17.1", default-features = false }
smol_str = { version = "0.3.1" }

[target.'cfg(unix)'.dependencies]
libloading = "0.9"
async-io = "2"

[build-dependencies]
napi-build = "2"
i-slint-common = { version = "=1.17.1", default-features = false }
