1# Copyright © SixtyFPS GmbH <info@slint.dev>
2# SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-1.1 OR LicenseRef-Slint-commercial
3
4[package]
5name = "slint-cpp"
6description = "Slint C++ integration"
7authors.workspace = true
8documentation.workspace = true
9edition.workspace = true
10homepage.workspace = true
11license.workspace = true
12repository.workspace = true
13rust-version.workspace = true
14version.workspace = true
15build = "build.rs"
16publish = false
17# prefix used to convey path to generated includes to the C++ test driver
18links = "slint_cpp"
19
20[lib]
21path = "lib.rs"
22crate-type = ["lib", "cdylib", "staticlib"]
23
24# Note, these features need to be kept in sync (along with their defaults) in
25# the C++ crate's CMakeLists.txt
26[features]
27interpreter = ["slint-interpreter", "std"]
28testing = ["i-slint-backend-testing"] # Enable some function used by the integration tests
29
30backend-qt = ["i-slint-backend-selector/backend-qt", "std"]
31backend-winit = ["i-slint-backend-selector/backend-winit", "std"]
32backend-winit-x11 = ["i-slint-backend-selector/backend-winit-x11", "std"]
33backend-winit-wayland = ["i-slint-backend-selector/backend-winit-wayland", "std"]
34backend-linuxkms = ["i-slint-backend-selector/backend-linuxkms", "std"]
35backend-linuxkms-noseat = ["i-slint-backend-selector/backend-linuxkms-noseat", "std"]
36renderer-femtovg = ["i-slint-backend-selector/renderer-femtovg"]
37renderer-skia = ["i-slint-backend-selector/renderer-skia", "i-slint-renderer-skia", "raw-window-handle"]
38renderer-skia-opengl = ["i-slint-backend-selector/renderer-skia-opengl", "renderer-skia"]
39renderer-skia-vulkan = ["i-slint-backend-selector/renderer-skia-vulkan", "renderer-skia"]
40renderer-software = ["i-slint-backend-selector/renderer-software"]
41gettext = ["i-slint-core/gettext-rs"]
42accessibility = ["i-slint-backend-selector/accessibility"]
43
44std = ["image", "i-slint-core/default", "i-slint-backend-selector"]
45freestanding = ["i-slint-core/libm", "i-slint-core/unsafe-single-threaded"]
46experimental = ["i-slint-core/software-renderer-rotation"]
47
48default = ["std", "backend-winit", "renderer-femtovg", "backend-qt"]
49
50[dependencies]
51i-slint-backend-selector = { workspace = true, optional = true }
52i-slint-backend-testing = { workspace = true, features = ["default"], optional = true }
53i-slint-renderer-skia = { workspace = true, features = ["default", "x11", "wayland"], optional = true }
54i-slint-core = { workspace = true, features = ["ffi"] }
55slint-interpreter = { workspace = true, features = ["ffi", "compat-1-2"], optional = true }
56raw-window-handle = { version = "0.5", optional = true }
57# Enable image-rs' default features to make all image formats to C++ users
58image = { version = "0.24.0", optional = true }
59
60esp-backtrace = { version = "0.11.0", features = ["panic-handler", "println"], optional = true }
61esp-println = { version = "0.9.0", default-features = false, features = ["uart"], optional = true }
62
63[build-dependencies]
64anyhow = "1.0"
65cbindgen = { workspace = true }
66proc-macro2 = "1.0.11"
67i-slint-common = { workspace = true, features = ["default"] }
68