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] |
5 | name = "slint-cpp" |
6 | description = "Slint C++ integration" |
7 | authors.workspace = true |
8 | documentation.workspace = true |
9 | edition.workspace = true |
10 | homepage.workspace = true |
11 | license.workspace = true |
12 | repository.workspace = true |
13 | rust-version.workspace = true |
14 | version.workspace = true |
15 | build = "build.rs" |
16 | publish = false |
17 | # prefix used to convey path to generated includes to the C++ test driver |
18 | links = "slint_cpp" |
19 | |
20 | [lib] |
21 | path = "lib.rs" |
22 | crate-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] |
27 | interpreter = ["slint-interpreter" , "std" ] |
28 | testing = ["i-slint-backend-testing" ] # Enable some function used by the integration tests |
29 | |
30 | backend-qt = ["i-slint-backend-selector/backend-qt" , "std" ] |
31 | backend-winit = ["i-slint-backend-selector/backend-winit" , "std" ] |
32 | backend-winit-x11 = ["i-slint-backend-selector/backend-winit-x11" , "std" ] |
33 | backend-winit-wayland = ["i-slint-backend-selector/backend-winit-wayland" , "std" ] |
34 | backend-linuxkms = ["i-slint-backend-selector/backend-linuxkms" , "std" ] |
35 | backend-linuxkms-noseat = ["i-slint-backend-selector/backend-linuxkms-noseat" , "std" ] |
36 | renderer-femtovg = ["i-slint-backend-selector/renderer-femtovg" ] |
37 | renderer-skia = ["i-slint-backend-selector/renderer-skia" , "i-slint-renderer-skia" , "raw-window-handle" ] |
38 | renderer-skia-opengl = ["i-slint-backend-selector/renderer-skia-opengl" , "renderer-skia" ] |
39 | renderer-skia-vulkan = ["i-slint-backend-selector/renderer-skia-vulkan" , "renderer-skia" ] |
40 | renderer-software = ["i-slint-backend-selector/renderer-software" ] |
41 | gettext = ["i-slint-core/gettext-rs" ] |
42 | accessibility = ["i-slint-backend-selector/accessibility" ] |
43 | |
44 | std = ["image" , "i-slint-core/default" , "i-slint-backend-selector" ] |
45 | freestanding = ["i-slint-core/libm" , "i-slint-core/unsafe-single-threaded" ] |
46 | experimental = ["i-slint-core/software-renderer-rotation" ] |
47 | |
48 | default = ["std" , "backend-winit" , "renderer-femtovg" , "backend-qt" ] |
49 | |
50 | [dependencies] |
51 | i-slint-backend-selector = { workspace = true, optional = true } |
52 | i-slint-backend-testing = { workspace = true, features = ["default" ], optional = true } |
53 | i-slint-renderer-skia = { workspace = true, features = ["default" , "x11" , "wayland" ], optional = true } |
54 | i-slint-core = { workspace = true, features = ["ffi" ] } |
55 | slint-interpreter = { workspace = true, features = ["ffi" , "compat-1-2" ], optional = true } |
56 | raw-window-handle = { version = "0.5" , optional = true } |
57 | # Enable image-rs' default features to make all image formats to C++ users |
58 | image = { version = "0.24.0" , optional = true } |
59 | |
60 | esp-backtrace = { version = "0.11.0" , features = ["panic-handler" , "println" ], optional = true } |
61 | esp-println = { version = "0.9.0" , default-features = false, features = ["uart" ], optional = true } |
62 | |
63 | [build-dependencies] |
64 | anyhow = "1.0" |
65 | cbindgen = { workspace = true } |
66 | proc-macro2 = "1.0.11" |
67 | i-slint-common = { workspace = true, features = ["default" ] } |
68 | |