ci: Format toml files

... using taplo with default settings

I tried this with 4 spaces indentation, but the patch is almost as
big as this one, so I went with default settings instead as that
is just easier:-)
This commit is contained in:
Tobias Hunger 2025-03-29 20:54:46 +00:00
parent 51f7834f56
commit cd6f2e2cf2
65 changed files with 1050 additions and 462 deletions

View file

@ -7,9 +7,11 @@ xtask = "run --package xtask --"
[target.xtensa-esp32s3-none-elf]
rustflags = [
# Recommended by the esp-backtrace crate used for panic handler
"-C", "force-frame-pointers",
"-C",
"force-frame-pointers",
# Without this flag, we get miscompilation of floating point operations that cause the clipping region to be totally wrong
"-C", "target-feature=-fp",
"-C",
"target-feature=-fp",
]
[target.xtensa-esp32s2-none-elf]

View file

@ -4,10 +4,6 @@
# cspell:ignore pipx
[tools]
"aqua:sharkdp/fd" = "latest"
"rust" = { version = "stable", profile = "default" }
node = "20"
pnpm = "latest"
## C++:
"ubi:EmbarkStudios/cargo-about" = "0.6.6"
@ -17,5 +13,11 @@ pnpm = "latest"
# doxygen = "latest" ## This is not available anywhere
# graphviz = "latest" ## This is not available anywhere
"aqua:sharkdp/fd" = "latest"
"rust" = { version = "stable", profile = "default" }
node = "20"
pnpm = "latest"
taplo = "latest"
[task_config]
includes = [".mise/tasks.toml", ".mise/tasks"]

View file

@ -23,6 +23,10 @@ tools = { "ruff" = "latest" }
description = "Run cargo fmt --all"
run = "cargo fmt --all"
["fix:toml:format"]
description = "Run taplo format"
run = "taplo format"
["fix:ts:format"]
description = "Run pnpm format:fix"
run = "pnpm run format:fix"
@ -45,7 +49,11 @@ depends = ["prepare:pnpm-install", "build:lsp:wasm", "build:interpreter:wasm"]
["build:lsp:wasm"]
description = "Build the LSP (WASM)"
dir = "editors/vscode"
sources = [ "tools/lsp/Cargo.toml", "tools/lsp/**/*.rs", "tools/lsp/ui/**/*.slint" ]
sources = [
"tools/lsp/Cargo.toml",
"tools/lsp/**/*.rs",
"tools/lsp/ui/**/*.slint",
]
outputs = ["tools/lsp/pkg/*"]
run = "pnpm run build:wasm_lsp"
tools = { "npm:wasm-pack" = "latest" }
@ -54,7 +62,10 @@ depends = ["prepare:pnpm-install"]
["build:interpreter:wasm"]
description = "Build the Slint interpreteer (WASM)"
dir = "tools/slintpad"
sources = [ "api/wasm-interpreter/Cargo.toml", "api/wasm-interpreter/src/**/*.rs" ]
sources = [
"api/wasm-interpreter/Cargo.toml",
"api/wasm-interpreter/src/**/*.rs",
]
outputs = ["api/wasm-interpreter/pkg/*"]
run = "pnpm run build:wasm_interpreter"
tools = { "npm:wasm-pack" = "latest" }
@ -68,7 +79,16 @@ run = "pnpm install --frozen-lockfile"
["ci:autofix:fix"]
description = "CI autofix job -- fix steps"
depends = ["fix:cpp:format", "fix:legal:copyright", "fix:python:format", "fix:rust:format", "fix:text:trailing_spaces", "fix:ts:biome", "fix:ts:format"]
depends = [
"fix:cpp:format",
"fix:legal:copyright",
"fix:python:format",
"fix:rust:format",
"fix:text:trailing_spaces",
"fix:toml:format",
"fix:ts:biome",
"fix:ts:format",
]
["ci:autofix:lint"]
description = "CI autofix job -- lint steps"

View file

@ -139,15 +139,31 @@ cfg_aliases = { version = "0.2.0" }
clap = { version = "4.0", features = ["derive", "wrap_help"] }
clru = { version = "0.6.0" }
css-color-parser2 = { version = "1.0.1" }
derive_more = { version = "2.0.0", default-features = false, features = ["deref", "deref_mut", "into", "from", "add", "add_assign", "mul", "not", "display"] }
derive_more = { version = "2.0.0", default-features = false, features = [
"deref",
"deref_mut",
"into",
"from",
"add",
"add_assign",
"mul",
"not",
"display",
] }
euclid = { version = "0.22.1", default-features = false }
fontdb = { version = "0.23.0", default-features = false }
fontdue = { version = "0.9.0" }
glutin = { version = "0.32.0", default-features = false }
image = { version = "0.25", default-features = false, features = [ "png", "jpeg" ] }
image = { version = "0.25", default-features = false, features = [
"png",
"jpeg",
] }
itertools = { version = "0.14" }
log = { version = "0.4.17" }
resvg = { version= "0.45.0", default-features = false, features = ["text", "raster-images"] }
resvg = { version = "0.45.0", default-features = false, features = [
"text",
"raster-images",
] }
rowan = { version = "0.16.1" }
rustybuzz = { version = "0.20.0" }
send_wrapper = { version = "0.6.0" }
@ -161,7 +177,9 @@ ttf-parser = { version = "0.25" }
web-sys = { version = "0.3.72", default-features = false }
smol_str = { version = "0.3.1" }
rayon = { version = "1.10.0", default-features = false }
raw-window-handle-06 = { package = "raw-window-handle", version = "0.6", features = ["alloc"] }
raw-window-handle-06 = { package = "raw-window-handle", version = "0.6", features = [
"alloc",
] }
unicode-segmentation = { version = "1.12.0" }
glow = { version = "0.16" }
tikv-jemallocator = { version = "0.6" }

View file

@ -169,7 +169,7 @@ path = [
"tools/lsp/ui/assets/search.svg",
"tools/lsp/ui/assets/sync.svg",
"tools/lsp/ui/assets/black-square.png",
"tools/lsp/ui/assets/close.svg"
"tools/lsp/ui/assets/close.svg",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Codicon Icons <https://github.com/microsoft/vscode-codicons/>"
@ -194,7 +194,7 @@ path = [
"internal/compiler/widgets/cupertino/_**.svg",
"internal/compiler/widgets/qt/_**.svg",
"examples/todo-mvc/assets/**.svg",
"demos/usecases/ui/assets/**.svg"
"demos/usecases/ui/assets/**.svg",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "Material Icons <https://github.com/material-icons/material-icons/blob/master/LICENSE>"

View file

@ -32,19 +32,39 @@ testing = ["dep:i-slint-backend-testing"]
backend-qt = ["i-slint-backend-selector/backend-qt", "std"]
backend-winit = ["i-slint-backend-selector/backend-winit", "std"]
backend-winit-x11 = ["i-slint-backend-selector/backend-winit-x11", "std"]
backend-winit-wayland = ["i-slint-backend-selector/backend-winit-wayland", "std"]
backend-winit-wayland = [
"i-slint-backend-selector/backend-winit-wayland",
"std",
]
backend-linuxkms = ["i-slint-backend-selector/backend-linuxkms", "std"]
backend-linuxkms-noseat = ["i-slint-backend-selector/backend-linuxkms-noseat", "std"]
backend-linuxkms-noseat = [
"i-slint-backend-selector/backend-linuxkms-noseat",
"std",
]
renderer-femtovg = ["i-slint-backend-selector/renderer-femtovg"]
renderer-skia = ["i-slint-backend-selector/renderer-skia", "i-slint-renderer-skia", "raw-window-handle"]
renderer-skia-opengl = ["i-slint-backend-selector/renderer-skia-opengl", "renderer-skia"]
renderer-skia-vulkan = ["i-slint-backend-selector/renderer-skia-vulkan", "renderer-skia"]
renderer-skia = [
"i-slint-backend-selector/renderer-skia",
"i-slint-renderer-skia",
"raw-window-handle",
]
renderer-skia-opengl = [
"i-slint-backend-selector/renderer-skia-opengl",
"renderer-skia",
]
renderer-skia-vulkan = [
"i-slint-backend-selector/renderer-skia-vulkan",
"renderer-skia",
]
renderer-software = ["i-slint-backend-selector/renderer-software"]
gettext = ["i-slint-core/gettext-rs"]
accessibility = ["i-slint-backend-selector/accessibility"]
system-testing = ["i-slint-backend-selector/system-testing"]
std = ["i-slint-core/default", "i-slint-core/image-default-formats", "i-slint-backend-selector"]
std = [
"i-slint-core/default",
"i-slint-core/image-default-formats",
"i-slint-backend-selector",
]
freestanding = ["i-slint-core/libm", "i-slint-core/unsafe-single-threaded"]
experimental = ["i-slint-core/experimental"]
@ -52,14 +72,28 @@ default = ["std", "backend-winit", "renderer-femtovg", "backend-qt"]
[dependencies]
i-slint-backend-selector = { workspace = true, optional = true }
i-slint-backend-testing = { workspace = true, optional = true, features = ["ffi"] }
i-slint-renderer-skia = { workspace = true, features = ["default", "x11", "wayland"], optional = true }
i-slint-backend-testing = { workspace = true, optional = true, features = [
"ffi",
] }
i-slint-renderer-skia = { workspace = true, features = [
"default",
"x11",
"wayland",
], optional = true }
i-slint-core = { workspace = true, features = ["ffi"] }
slint-interpreter = { workspace = true, features = ["ffi", "compat-1-2"], optional = true }
slint-interpreter = { workspace = true, features = [
"ffi",
"compat-1-2",
], optional = true }
raw-window-handle = { version = "0.6", optional = true }
esp-backtrace = { version = "0.14.0", features = ["panic-handler", "println"], optional = true }
esp-println = { version = "0.12.0", default-features = false, features = ["uart"], optional = true }
esp-backtrace = { version = "0.14.0", features = [
"panic-handler",
"println",
], optional = true }
esp-println = { version = "0.12.0", default-features = false, features = [
"uart",
], optional = true }
unicode-segmentation = { workspace = true }
[build-dependencies]

View file

@ -21,7 +21,13 @@ crate-type = ["cdylib"]
path = "rust/lib.rs"
[features]
default = ["backend-winit", "renderer-femtovg", "renderer-software", "backend-qt", "accessibility"]
default = [
"backend-winit",
"renderer-femtovg",
"renderer-software",
"backend-qt",
"accessibility",
]
# Keep in sync with features in nightly_snapshot.yaml, cpp_package.yaml, slint_tool_binary.yaml, and api/python/Cargo.toml
# binaries: default = ["backend-linuxkms-noseat", "backend-winit", "renderer-femtovg", "renderer-skia", "accessibility"]
@ -47,7 +53,11 @@ napi-derive = "2.14.0"
i-slint-compiler = { workspace = true, features = ["default"] }
i-slint-core = { workspace = true, features = ["default", "gettext-rs"] }
i-slint-backend-selector = { workspace = true }
slint-interpreter = { workspace = true, default-features = false, features = ["display-diagnostics", "internal", "compat-1-2"] }
slint-interpreter = { workspace = true, default-features = false, features = [
"display-diagnostics",
"internal",
"compat-1-2",
] }
spin_on = { workspace = true }
css-color-parser2 = { workspace = true }
itertools = { workspace = true }

View file

@ -22,7 +22,13 @@ name = "stub-gen"
path = "stub-gen/main.rs"
[features]
default = ["backend-winit", "renderer-femtovg", "renderer-software", "backend-qt", "accessibility"]
default = [
"backend-winit",
"renderer-femtovg",
"renderer-software",
"backend-qt",
"accessibility",
]
# Keep in sync with features in nightly_snapshot.yaml, cpp_package.yaml, slint_tool_binary.yaml, and api/node/Cargo.toml
# binaries: default = ["backend-linuxkms-noseat", "backend-winit", "renderer-femtovg", "renderer-skia", "accessibility"]
@ -43,9 +49,18 @@ accessibility = ["slint-interpreter/accessibility"]
[dependencies]
i-slint-backend-selector = { workspace = true }
i-slint-core = { workspace = true }
slint-interpreter = { workspace = true, features = ["default", "display-diagnostics", "internal"] }
slint-interpreter = { workspace = true, features = [
"default",
"display-diagnostics",
"internal",
] }
i-slint-compiler = { workspace = true }
pyo3 = { version = "0.21.0", features = ["extension-module", "indexmap", "chrono", "abi3-py310"] }
pyo3 = { version = "0.21.0", features = [
"extension-module",
"indexmap",
"chrono",
"abi3-py310",
] }
indexmap = { version = "2.1.0" }
chrono = "0.4"
spin_on = { workspace = true }

View file

@ -9,9 +9,7 @@ build-backend = "maturin"
name = "slint"
version = "1.11.0a1"
requires-python = ">= 3.12"
authors = [
{name = "Slint Team", email = "info@slint.dev"},
]
authors = [{ name = "Slint Team", email = "info@slint.dev" }]
classifiers = [
"Development Status :: 3 - Alpha",
"Environment :: MacOS X",
@ -30,9 +28,7 @@ classifiers = [
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
]
dependencies = [
"maturin>=1.8.2",
]
dependencies = ["maturin>=1.8.2"]
[project.urls]
Homepage = "https://slint.dev"
@ -55,7 +51,11 @@ dev = [
[tool.uv]
# Rebuild package when any rust files change
cache-keys = [{file = "pyproject.toml"}, {file = "Cargo.toml"}, {file = "**/*.rs"}]
cache-keys = [
{ file = "pyproject.toml" },
{ file = "Cargo.toml" },
{ file = "**/*.rs" },
]
# Uncomment to build rust code in development mode
# config-settings = { build-args = '--profile=dev' }

View file

@ -22,7 +22,13 @@ default = []
sdf-fonts = ["i-slint-compiler/sdf-fonts"]
[dependencies]
i-slint-compiler = { workspace = true, features = ["default", "rust", "display-diagnostics", "software-renderer", "bundle-translations"] }
i-slint-compiler = { workspace = true, features = [
"default",
"rust",
"display-diagnostics",
"software-renderer",
"bundle-translations",
] }
spin_on = { workspace = true }
toml_edit = { workspace = true }

View file

@ -22,7 +22,12 @@ path = "lib.rs"
default = []
[dependencies]
i-slint-compiler = { workspace = true, features = ["default", "proc_macro_span", "rust", "display-diagnostics"] }
i-slint-compiler = { workspace = true, features = [
"default",
"proc_macro_span",
"rust",
"display-diagnostics",
] }
proc-macro2 = "1.0.17"
quote = "1.0"

View file

@ -61,7 +61,10 @@ log = ["dep:log"]
serde = ["i-slint-core/serde"]
## This feature enables the software renderer to pick up fonts from the operating system for text rendering.
software-renderer-systemfonts = ["renderer-software", "i-slint-core/software-renderer-systemfonts"]
software-renderer-systemfonts = [
"renderer-software",
"i-slint-core/software-renderer-systemfonts",
]
## Slint uses internally some `thread_local` state.
##
@ -82,7 +85,10 @@ accessibility = ["i-slint-backend-selector/accessibility"]
## [`Window::window_handle()`] function that returns a struct that implements
## [HasWindowHandle](raw_window_handle_06::HasWindowHandle) and
## [HasDisplayHandle](raw_window_handle_06::HasDisplayHandle) implementation.
raw-window-handle-06 = ["dep:raw-window-handle-06", "i-slint-backend-selector/raw-window-handle-06"]
raw-window-handle-06 = [
"dep:raw-window-handle-06",
"i-slint-backend-selector/raw-window-handle-06",
]
## Enable the default image formats from the `image` crate, to support additional image formats in [`Image::load_from_path`]
## and `@image-url`. When this feature is disabled, only PNG and JPEG are supported. When enabled,
@ -119,7 +125,11 @@ image-default-formats = ["i-slint-core/image-default-formats"]
## 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/backend-qt", "std", "i-slint-backend-qt"]
backend-qt = [
"i-slint-backend-selector/backend-qt",
"std",
"i-slint-backend-qt",
]
## The [winit](https://crates.io/crates/winit) crate is used for the event loop and windowing system integration.
## It supports Windows, macOS, web browsers, X11 and Wayland. X11 and wayland are only available when
@ -133,7 +143,10 @@ 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"]
backend-winit-wayland = [
"i-slint-backend-selector/backend-winit-wayland",
"std",
]
## Alias to a backend and renderer that depends on the platform.
## Will select the Qt backend on linux if present, and the winit otherwise
@ -147,7 +160,11 @@ renderer-winit-skia-vulkan= ["renderer-skia-vulkan"]
renderer-winit-software = ["renderer-software"]
## Render using the [FemtoVG](https://crates.io/crates/femtovg) crate.
renderer-femtovg = ["i-slint-backend-selector/renderer-femtovg", "dep:i-slint-renderer-femtovg", "std"]
renderer-femtovg = [
"i-slint-backend-selector/renderer-femtovg",
"dep:i-slint-renderer-femtovg",
"std",
]
## Render using [Skia](https://skia.org/).
renderer-skia = ["i-slint-backend-selector/renderer-skia", "std"]
@ -159,7 +176,10 @@ renderer-skia-opengl = ["i-slint-backend-selector/renderer-skia-opengl", "std"]
renderer-skia-vulkan = ["i-slint-backend-selector/renderer-skia-vulkan", "std"]
## Render using the software renderer.
renderer-software = ["i-slint-backend-selector/renderer-software", "i-slint-core/software-renderer"]
renderer-software = [
"i-slint-backend-selector/renderer-software",
"i-slint-core/software-renderer",
]
## KMS with Vulkan or EGL and libinput on Linux are used to render the application in full screen mode, without any
## windowing system. Requires libseat. If you don't have libseat, select `backend-linuxkms-noseat` instead. (Experimental)
@ -167,13 +187,22 @@ backend-linuxkms = ["i-slint-backend-selector/backend-linuxkms", "std"]
## KMS with Vulkan or EGL and libinput on Linux are used to render the application in full screen mode, without any
## windowing system. (Experimental)
backend-linuxkms-noseat = ["i-slint-backend-selector/backend-linuxkms-noseat", "std"]
backend-linuxkms-noseat = [
"i-slint-backend-selector/backend-linuxkms-noseat",
"std",
]
## Use the backend based on the [android-activity](https://docs.rs/android-activity) crate. (Using it's native activity feature)
backend-android-activity-06 = ["i-slint-backend-android-activity/native-activity", "i-slint-backend-android-activity/aa-06"]
backend-android-activity-06 = [
"i-slint-backend-android-activity/native-activity",
"i-slint-backend-android-activity/aa-06",
]
## **Deprecated** Use previous version of android-activity. This is mutually exclusive with `backend-android-activity-06`.
backend-android-activity-05 = ["i-slint-backend-android-activity/native-activity", "i-slint-backend-android-activity/aa-05"]
backend-android-activity-05 = [
"i-slint-backend-android-activity/native-activity",
"i-slint-backend-android-activity/aa-05",
]
[dependencies]
i-slint-core = { workspace = true }
@ -206,17 +235,34 @@ i-slint-backend-android-activity = { workspace = true, optional = true }
[dev-dependencies]
slint-build = { path = "../build" }
# The next can not be a workspace dependency because it may not have a version
i-slint-backend-testing = { path = "../../../internal/backends/testing", features = ["internal"] }
i-slint-backend-testing = { path = "../../../internal/backends/testing", features = [
"internal",
] }
i-slint-renderer-skia = { path = "../../../internal/renderers/skia" }
serde_json = { workspace = true }
serde = { workspace = true }
tokio = { version = "1", features = ["rt-multi-thread", "macros", "sync", "net", "io-util"]}
tokio = { version = "1", features = [
"rt-multi-thread",
"macros",
"sync",
"net",
"io-util",
] }
async-compat = { version = "0.2.4" }
bytemuck = { workspace = true }
[target.'cfg(target_os = "linux")'.dependencies]
# this line is there to add the "enable" feature by default, but only on linux
i-slint-backend-qt = { workspace = true, features = [ "enable" ], optional = true }
i-slint-backend-qt = { workspace = true, features = [
"enable",
], optional = true }
[package.metadata.docs.rs]
features = ["document-features", "log", "gettext", "renderer-software", "renderer-femtovg", "raw-window-handle-06"]
features = [
"document-features",
"log",
"gettext",
"renderer-software",
"renderer-femtovg",
"raw-window-handle-06",
]

View file

@ -17,7 +17,13 @@ publish = false
crate-type = ["cdylib"]
[dependencies]
slint-interpreter = { workspace = true, features = ["std", "backend-winit", "renderer-femtovg", "compat-1-2", "internal"] }
slint-interpreter = { workspace = true, features = [
"std",
"backend-winit",
"renderer-femtovg",
"compat-1-2",
"internal",
] }
send_wrapper = { workspace = true }
vtable = { workspace = true }
@ -26,7 +32,13 @@ console_error_panic_hook = { version = "0.1.6", optional = true }
js-sys = "0.3.44"
wasm-bindgen-futures = { version = "0.4.18" }
wasm-bindgen = { version = "0.2.66" }
web-sys = { workspace = true, features = ["Request", "RequestInit", "RequestMode", "Response", "Window"] }
web-sys = { workspace = true, features = [
"Request",
"RequestInit",
"RequestMode",
"Response",
"Window",
] }
#[dev-dependencies]
#wasm-bindgen-test = "0.3.13"

View file

@ -14,9 +14,15 @@ license = "MIT"
crate-type = ["cdylib", "lib"]
[dependencies]
slint = { path = "../../api/rs/slint", default-features = false, features = ["compat-1-2"] }
slint = { path = "../../api/rs/slint", default-features = false, features = [
"compat-1-2",
] }
mcu-board-support = { path = "../../examples/mcu-board-support", optional = true }
chrono = { version = "0.4.34", optional = true, default-features = false, features = ["clock", "std", "wasmbind"] }
chrono = { version = "0.4.34", optional = true, default-features = false, features = [
"clock",
"std",
"wasmbind",
] }
weer_api = { version = "0.1", optional = true }
tokio = { version = "1.25", optional = true, features = ["full"] }
futures = { version = "0.3.26", optional = true }
@ -30,6 +36,16 @@ console_error_panic_hook = "0.1.5"
slint-build = { path = "../../api/rs/build" }
[features]
default = ["slint/default", "network", "chrono", "slint/backend-android-activity-06"]
simulator = ["mcu-board-support", "slint/renderer-software", "slint/backend-winit", "slint/std"]
default = [
"slint/default",
"network",
"chrono",
"slint/backend-android-activity-06",
]
simulator = [
"mcu-board-support",
"slint/renderer-software",
"slint/backend-winit",
"slint/std",
]
network = ["dep:weer_api", "tokio", "futures"]

View file

@ -7,9 +7,7 @@ version = "1.10.0"
description = "Slint Printer Demo for Python"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"slint",
]
dependencies = ["slint"]
[tool.uv.sources]
slint = { path = "../../../api/python", editable = true }

View file

@ -20,8 +20,13 @@ crate-type = ["lib", "cdylib"]
name = "printerdemo_lib"
[dependencies]
slint = { path = "../../../api/rs/slint", features = ["backend-android-activity-06"] }
chrono = { version = "0.4", default-features = false, features = ["clock", "std"]}
slint = { path = "../../../api/rs/slint", features = [
"backend-android-activity-06",
] }
chrono = { version = "0.4", default-features = false, features = [
"clock",
"std",
] }
[target.'cfg(not(any(target_os = "android", target_arch = "wasm32")))'.dependencies]
slint = { path = "../../../api/rs/slint", features = ["gettext"] }
@ -33,8 +38,3 @@ slint-build = { path = "../../../api/rs/build" }
wasm-bindgen = { version = "0.2" }
web-sys = { version = "0.3", features = ["console"] }
console_error_panic_hook = "0.1.5"

View file

@ -19,7 +19,9 @@ simulator = ["slint/renderer-software", "slint/backend-winit", "slint/std"]
default = ["simulator"]
[dependencies]
slint = { path = "../../api/rs/slint", default-features = false, features = ["compat-1-2"] }
slint = { path = "../../api/rs/slint", default-features = false, features = [
"compat-1-2",
] }
mcu-board-support = { path = "../../examples/mcu-board-support" }
[build-dependencies]

View file

@ -20,7 +20,10 @@ path = "src/main.rs"
name = "usecases"
[dependencies]
slint = { path = "../../../api/rs/slint", features = ["serde", "backend-android-activity-06"] }
slint = { path = "../../../api/rs/slint", features = [
"serde",
"backend-android-activity-06",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
@ -30,5 +33,3 @@ console_error_panic_hook = "0.1.5"
[build-dependencies]
slint-build = { path = "../../../api/rs/build" }

View file

@ -12,12 +12,16 @@ license = "MIT"
[dependencies]
async-std = "1.12.0"
chrono = { version = "0.4.38", optional = true, default-features = false, features = ["clock"] }
chrono = { version = "0.4.38", optional = true, default-features = false, features = [
"clock",
] }
directories = "6.0"
log = "0.4.21"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0.115"
slint = { path = "../../api/rs/slint", features = [ "backend-android-activity-06" ] }
slint = { path = "../../api/rs/slint", features = [
"backend-android-activity-06",
] }
[target.'cfg(all(not(target_arch = "wasm32"), not(target_os = "android")))'.dependencies]
env_logger = "0.11.3"

View file

@ -29,4 +29,7 @@ name = "cells"
[dependencies]
slint = { path = "../../api/rs/slint" }
chrono = { version = "0.4", default-features = false, features = ["clock", "std"]}
chrono = { version = "0.4", default-features = false, features = [
"clock",
"std",
] }

View file

@ -15,7 +15,9 @@ path = "main.rs"
name = "carousel"
[dependencies]
slint = { path = "../../../api/rs/slint", default-features = false, features = ["compat-1-2"] }
slint = { path = "../../../api/rs/slint", default-features = false, features = [
"compat-1-2",
] }
mcu-board-support = { path = "../../mcu-board-support", optional = true }
[build-dependencies]
@ -23,7 +25,12 @@ slint-build = { path = "../../../api/rs/build" }
[features]
default = ["slint/default"]
simulator = ["mcu-board-support", "slint/renderer-software", "slint/backend-winit", "slint/std"]
simulator = [
"mcu-board-support",
"slint/renderer-software",
"slint/backend-winit",
"slint/std",
]
# Remove the `#wasm#` to uncomment the wasm build.

View file

@ -27,4 +27,3 @@ derive_more = { workspace = true}
[build-dependencies]
slint-build = { path = "../../api/rs/build" }

View file

@ -32,4 +32,3 @@ glutin_egl_sys = "0.7.1"
[build-dependencies]
slint-build = { path = "../../api/rs/build" }
cfg_aliases = { workspace = true }

View file

@ -18,5 +18,3 @@ slint = { path = "../../api/rs/slint" }
image = { workspace = true }
reqwest = { version = "0.12" }
tokio = { version = "1", features = ["full"] }

View file

@ -18,14 +18,97 @@ path = "lib.rs"
[features]
pico-st7789 = ["slint/unsafe-single-threaded", "rp-pico", "embedded-hal", "embedded-hal-nb", "cortex-m-rt", "embedded-alloc", "fugit", "cortex-m", "dep:mipidsi", "defmt", "defmt-rtt", "slint/libm", "embedded-dma", "embedded-graphics", "euclid/libm"]
pico2-st7789 = ["slint/unsafe-single-threaded", "rp235x-hal/binary-info", "rp235x-hal/critical-section-impl", "rp235x-hal/rt", "rp235x-hal/defmt", "embedded-hal", "embedded-hal-nb", "cortex-m-rt", "embedded-alloc", "fugit", "cortex-m", "dep:mipidsi", "defmt", "defmt-rtt", "slint/libm", "embedded-dma", "embedded-graphics", "euclid/libm"]
stm32h735g = ["slint/unsafe-single-threaded", "cortex-m/critical-section-single-core", "cortex-m-rt","embedded-alloc", "embedded-time", "stm32h7xx-hal/stm32h735", "defmt", "defmt-rtt", "embedded-display-controller", "ft5336", "panic-probe", "slint/libm", "getrandom"]
pico-st7789 = [
"slint/unsafe-single-threaded",
"rp-pico",
"embedded-hal",
"embedded-hal-nb",
"cortex-m-rt",
"embedded-alloc",
"fugit",
"cortex-m",
"dep:mipidsi",
"defmt",
"defmt-rtt",
"slint/libm",
"embedded-dma",
"embedded-graphics",
"euclid/libm",
]
pico2-st7789 = [
"slint/unsafe-single-threaded",
"rp235x-hal/binary-info",
"rp235x-hal/critical-section-impl",
"rp235x-hal/rt",
"rp235x-hal/defmt",
"embedded-hal",
"embedded-hal-nb",
"cortex-m-rt",
"embedded-alloc",
"fugit",
"cortex-m",
"dep:mipidsi",
"defmt",
"defmt-rtt",
"slint/libm",
"embedded-dma",
"embedded-graphics",
"euclid/libm",
]
stm32h735g = [
"slint/unsafe-single-threaded",
"cortex-m/critical-section-single-core",
"cortex-m-rt",
"embedded-alloc",
"embedded-time",
"stm32h7xx-hal/stm32h735",
"defmt",
"defmt-rtt",
"embedded-display-controller",
"ft5336",
"panic-probe",
"slint/libm",
"getrandom",
]
# esp32-s3-box = ["slint/unsafe-single-threaded", "esp-hal/esp32s3", "embedded-hal", "embedded-hal-bus", "esp-alloc", "esp-println/esp32s3", "esp-backtrace/esp32s3", "dep:mipidsi", "embedded-graphics-core", "slint/libm", "tt21100"]
stm32u5g9j-dk2 = ["embassy-stm32/stm32u5g9zj", "embassy-stm32/time-driver-any", "embassy-stm32/exti", "embassy-stm32/memory-x", "embassy-stm32/unstable-pac", "embassy-stm32/chrono", "embassy-stm32/time", "embassy-stm32/defmt", "embassy-executor/arch-cortex-m", "embassy-executor/executor-interrupt", "embassy-executor/task-arena-size-32768", "embassy-executor/executor-thread", "slint/libm", "slint/unsafe-single-threaded", "defmt", "defmt-rtt", "embedded-alloc", "getrandom", "cortex-m/critical-section-single-core", "cortex-m-rt", "panic-probe", "embassy-time/tick-hz-32_768", "embassy-time/defmt", "embassy-time/defmt-timestamp-uptime", "rand_core", "cortex-m/inline-asm", "cortex-m/critical-section-single-core", "gt911/defmt", "embassy-futures", "i-slint-core/experimental"]
stm32u5g9j-dk2 = [
"embassy-stm32/stm32u5g9zj",
"embassy-stm32/time-driver-any",
"embassy-stm32/exti",
"embassy-stm32/memory-x",
"embassy-stm32/unstable-pac",
"embassy-stm32/chrono",
"embassy-stm32/time",
"embassy-stm32/defmt",
"embassy-executor/arch-cortex-m",
"embassy-executor/executor-interrupt",
"embassy-executor/task-arena-size-32768",
"embassy-executor/executor-thread",
"slint/libm",
"slint/unsafe-single-threaded",
"defmt",
"defmt-rtt",
"embedded-alloc",
"getrandom",
"cortex-m/critical-section-single-core",
"cortex-m-rt",
"panic-probe",
"embassy-time/tick-hz-32_768",
"embassy-time/defmt",
"embassy-time/defmt-timestamp-uptime",
"rand_core",
"cortex-m/inline-asm",
"cortex-m/critical-section-single-core",
"gt911/defmt",
"embassy-futures",
"i-slint-core/experimental",
]
[dependencies]
slint = { version = "=1.11.0", path = "../../api/rs/slint", default-features = false, features = ["compat-1-2", "renderer-software"] }
slint = { version = "=1.11.0", path = "../../api/rs/slint", default-features = false, features = [
"compat-1-2",
"renderer-software",
] }
i-slint-core = { workspace = true }
i-slint-core-macros = { version = "=1.11.0", path = "../../internal/core-macros" }
@ -48,8 +131,14 @@ rp235x-hal = { version = "0.2.0", default-features = false, optional = true }
fugit = { version = "0.3.6", optional = true }
euclid = { version = "0.22", default-features = false, optional = true }
stm32h7xx-hal = { version = "0.16.0", optional = true, features = ["log-rtt", "ltdc", "xspi"] }
getrandom = { version = "0.2", optional = true, default-features = false, features = ["custom"] }
stm32h7xx-hal = { version = "0.16.0", optional = true, features = [
"log-rtt",
"ltdc",
"xspi",
] }
getrandom = { version = "0.2", optional = true, default-features = false, features = [
"custom",
] }
embedded-time = { version = "0.12.0", optional = true }
embedded-display-controller = { version = "0.2.0", optional = true }
ft5336 = { version = "0.2", optional = true }
@ -58,7 +147,10 @@ ft5336 = { version = "0.2", optional = true }
# esp-hal = { version = "0.22", optional = true }
esp-alloc = { version = "0.5", optional = true }
esp-println = { version = "0.12.0", optional = true }
esp-backtrace = { version = "0.14.0", optional = true, features = ["panic-handler", "println"] }
esp-backtrace = { version = "0.14.0", optional = true, features = [
"panic-handler",
"println",
] }
tt21100 = { version = "0.1", optional = true }
mipidsi = { version = "0.9.0", optional = true }

View file

@ -4,10 +4,14 @@
[target.xtensa-esp32s3-none-elf]
runner = "espflash flash --monitor"
rustflags = [
"-C", "force-frame-pointers",
"-C", "link-arg=-nostartfiles",
"-C", "link-arg=-Wl,-Tlinkall.x",
"-C", "target-feature=-fp",
"-C",
"force-frame-pointers",
"-C",
"link-arg=-nostartfiles",
"-C",
"link-arg=-Wl,-Tlinkall.x",
"-C",
"target-feature=-fp",
]
[build]

View file

@ -1,16 +1,8 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT
link_args = [
"--nmagic",
"-Tlink.x",
"-Tdefmt.x",
]
link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"]
rustflags = [
"-C", "target-cpu=cortex-m33",
]
rustflags = ["-C", "target-cpu=cortex-m33"]
link_search_path = [
"."
]
link_search_path = ["."]

View file

@ -1,11 +1,5 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT
link_args = [
"--nmagic",
"-Tlink.x",
"-Tdefmt.x",
]
link_search_path = [
"."
]
link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"]
link_search_path = ["."]

View file

@ -1,11 +1,5 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT
link_args = [
"--nmagic",
"-Tlink.x",
"-Tdefmt.x",
]
link_search_path = [
"."
]
link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"]
link_search_path = ["."]

View file

@ -1,11 +1,5 @@
# Copyright © SixtyFPS GmbH <info@slint.dev>
# SPDX-License-Identifier: MIT
link_args = [
"--nmagic",
"-Tlink.x",
"-Tdefmt.x",
]
link_search_path = [
"."
]
link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"]
link_search_path = ["."]

View file

@ -7,9 +7,7 @@ version = "1.10.0"
description = "Slint Memory Tiles Python Example"
readme = "README.md"
requires-python = ">=3.12"
dependencies = [
"slint",
]
dependencies = ["slint"]
[tool.uv.sources]
slint = { path = "../../api/python", editable = true }

View file

@ -15,7 +15,12 @@ name = "plotter"
[dependencies]
slint = { path = "../../api/rs/slint" }
plotters = { version = "0.3.5", default-features = false, features = ["bitmap_backend", "surface_series", "fontconfig-dlopen", "ttf"] }
plotters = { version = "0.3.5", default-features = false, features = [
"bitmap_backend",
"surface_series",
"fontconfig-dlopen",
"ttf",
] }
[build-dependencies]
slint-build = { path = "../../api/rs/build" }

View file

@ -20,7 +20,10 @@ path = "src/main.rs"
name = "todo-mvc"
[dependencies]
slint = { path = "../../../api/rs/slint", features = ["serde", "backend-android-activity-06"] }
slint = { path = "../../../api/rs/slint", features = [
"serde",
"backend-android-activity-06",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
chrono = { version = "0.4" }

View file

@ -20,7 +20,10 @@ path = "main.rs"
name = "todo"
[dependencies]
slint = { path = "../../../api/rs/slint", features = ["serde", "backend-android-activity-06"] }
slint = { path = "../../../api/rs/slint", features = [
"serde",
"backend-android-activity-06",
] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
@ -33,4 +36,3 @@ slint-build = { path = "../../../api/rs/build" }
[dev-dependencies]
i-slint-backend-testing = { workspace = true }

View file

@ -16,8 +16,14 @@ version.workspace = true
path = "lib.rs"
[features]
game-activity = ["android-activity-06?/game-activity", "android-activity-05?/game-activity"]
native-activity = ["android-activity-06?/native-activity", "android-activity-05?/native-activity"]
game-activity = [
"android-activity-06?/game-activity",
"android-activity-05?/game-activity",
]
native-activity = [
"android-activity-06?/native-activity",
"android-activity-05?/native-activity",
]
aa-06 = ["android-activity-06", "ndk-09"]
aa-05 = ["android-activity-05", "ndk-08"]
@ -30,8 +36,12 @@ android-activity-06 = { package = "android-activity", version = "0.6", optional
jni = { version = "0.21", features = ["invocation"] }
# We only depends on the NDK directly to enable raw-window-handle 0.6 which we need for the skia renderer
ndk-08 = { package = "ndk", version = "0.8.0", optional = true, features = ["rwh_06"] }
ndk-09 = { package = "ndk", version = "0.9.0", optional = true, features = ["rwh_06"], default-features = false }
ndk-08 = { package = "ndk", version = "0.8.0", optional = true, features = [
"rwh_06",
] }
ndk-09 = { package = "ndk", version = "0.9.0", optional = true, features = [
"rwh_06",
], default-features = false }
[package.metadata.docs.rs]
targets = [

View file

@ -17,20 +17,52 @@ path = "lib.rs"
[features]
renderer-skia = ["renderer-skia-opengl"]
renderer-skia-vulkan = ["i-slint-renderer-skia/vulkan", "vulkano", "drm", "dep:memmap2"]
renderer-skia-opengl = ["i-slint-renderer-skia/opengl", "drm", "gbm", "glutin", "raw-window-handle", "dep:memmap2"]
renderer-femtovg = ["i-slint-renderer-femtovg", "drm", "gbm", "glutin", "raw-window-handle"]
renderer-software = ["i-slint-core/software-renderer-systemfonts", "drm", "dep:bytemuck", "dep:memmap2"]
renderer-skia-vulkan = [
"i-slint-renderer-skia/vulkan",
"vulkano",
"drm",
"dep:memmap2",
]
renderer-skia-opengl = [
"i-slint-renderer-skia/opengl",
"drm",
"gbm",
"glutin",
"raw-window-handle",
"dep:memmap2",
]
renderer-femtovg = [
"i-slint-renderer-femtovg",
"drm",
"gbm",
"glutin",
"raw-window-handle",
]
renderer-software = [
"i-slint-core/software-renderer-systemfonts",
"drm",
"dep:bytemuck",
"dep:memmap2",
]
libseat = ["dep:libseat"]
#default = ["renderer-skia", "renderer-femtovg"]
default = []
[dependencies]
i-slint-core = { workspace = true, features = ["default", "image-decoders", "svg"] }
i-slint-core = { workspace = true, features = [
"default",
"image-decoders",
"svg",
] }
i-slint-common = { workspace = true, features = ["default"] }
i-slint-renderer-skia = { workspace = true, features = ["default", "kms"], optional = true }
i-slint-renderer-femtovg = { workspace = true, features = ["default"], optional = true }
i-slint-renderer-skia = { workspace = true, features = [
"default",
"kms",
], optional = true }
i-slint-renderer-femtovg = { workspace = true, features = [
"default",
], optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
input = { version = "0.9.0" }
@ -40,8 +72,13 @@ libseat = { version = "0.2.1", optional = true, default-features = false }
nix = { version = "0.29.0", features = ["fs", "ioctl"] }
vulkano = { version = "0.34.0", optional = true, default-features = false }
drm = { version = "0.14.0", optional = true }
gbm = { version = "0.18.0", optional = true, default-features = false, features = ["drm-support"] }
glutin = { workspace = true, optional = true, default-features = false, features = ["libloading", "egl"] }
gbm = { version = "0.18.0", optional = true, default-features = false, features = [
"drm-support",
] }
glutin = { workspace = true, optional = true, default-features = false, features = [
"libloading",
"egl",
] }
raw-window-handle = { version = "0.6.2", optional = true }
bytemuck = { workspace = true, optional = true, features = ["derive"] }
memmap2 = { version = "0.9.4", optional = true }

View file

@ -16,7 +16,14 @@ links = "i_slint_backend_qt" # just so we can pass metadata to the dependee's bu
[features]
rtti = ["i-slint-core/rtti"]
default = ["enable"]
enable = ["dep:cpp", "dep:lyon_path", "dep:pin-project", "dep:pin-weak", "dep:qttypes", "dep:cpp_build"]
enable = [
"dep:cpp",
"dep:lyon_path",
"dep:pin-project",
"dep:pin-weak",
"dep:qttypes",
"dep:cpp_build",
]
[lib]
path = "lib.rs"

View file

@ -24,16 +24,37 @@ backend-linuxkms = ["i-slint-backend-linuxkms/libseat"]
backend-linuxkms-noseat = ["i-slint-backend-linuxkms"]
backend-qt = ["i-slint-backend-qt/enable"]
renderer-femtovg = ["i-slint-backend-winit?/renderer-femtovg", "i-slint-backend-linuxkms?/renderer-femtovg"]
renderer-skia = ["i-slint-backend-winit?/renderer-skia", "i-slint-backend-linuxkms?/renderer-skia"]
renderer-skia-opengl = ["i-slint-backend-winit?/renderer-skia-opengl", "i-slint-backend-linuxkms?/renderer-skia-opengl", "i-slint-renderer-skia/opengl"]
renderer-skia-vulkan = ["i-slint-backend-winit?/renderer-skia-vulkan", "i-slint-backend-linuxkms?/renderer-skia-vulkan", "i-slint-renderer-skia/vulkan"]
renderer-software = ["i-slint-backend-winit?/renderer-software", "i-slint-backend-linuxkms?/renderer-software", "i-slint-core/software-renderer"]
renderer-femtovg = [
"i-slint-backend-winit?/renderer-femtovg",
"i-slint-backend-linuxkms?/renderer-femtovg",
]
renderer-skia = [
"i-slint-backend-winit?/renderer-skia",
"i-slint-backend-linuxkms?/renderer-skia",
]
renderer-skia-opengl = [
"i-slint-backend-winit?/renderer-skia-opengl",
"i-slint-backend-linuxkms?/renderer-skia-opengl",
"i-slint-renderer-skia/opengl",
]
renderer-skia-vulkan = [
"i-slint-backend-winit?/renderer-skia-vulkan",
"i-slint-backend-linuxkms?/renderer-skia-vulkan",
"i-slint-renderer-skia/vulkan",
]
renderer-software = [
"i-slint-backend-winit?/renderer-software",
"i-slint-backend-linuxkms?/renderer-software",
"i-slint-core/software-renderer",
]
rtti = ["i-slint-core/rtti", "i-slint-backend-qt?/rtti"]
accessibility = ["i-slint-backend-winit?/accessibility"]
raw-window-handle-06 = ["i-slint-core/raw-window-handle-06", "i-slint-backend-winit?/raw-window-handle-06"]
raw-window-handle-06 = [
"i-slint-core/raw-window-handle-06",
"i-slint-backend-winit?/raw-window-handle-06",
]
system-testing = ["i-slint-backend-testing/system-testing"]
@ -47,14 +68,19 @@ i-slint-backend-testing = { workspace = true, optional = true }
i-slint-core-macros = { workspace = true }
[target.'cfg(not(target_os = "android"))'.dependencies]
i-slint-backend-winit = { workspace = true, features = ["default", "muda"], optional = true }
i-slint-backend-winit = { workspace = true, features = [
"default",
"muda",
], optional = true }
i-slint-renderer-skia = { workspace = true, optional = true }
[target.'cfg(not(target_os = "wasm"))'.dependencies]
i-slint-backend-qt = { workspace = true, optional = true }
[target.'cfg(target_os = "linux")'.dependencies]
i-slint-backend-linuxkms = { workspace = true, features = ["default"], optional = true }
i-slint-backend-linuxkms = { workspace = true, features = [
"default",
], optional = true }
[build-dependencies]
i-slint-common = { workspace = true }

View file

@ -21,7 +21,15 @@ path = "lib.rs"
internal = []
# ffi for C++ bindings
ffi = []
system-testing = ["quick-protobuf", "pb-rs", "generational-arena", "async-net", "futures-lite", "byteorder", "image"]
system-testing = [
"quick-protobuf",
"pb-rs",
"generational-arena",
"async-net",
"futures-lite",
"byteorder",
"image",
]
[dependencies]
i-slint-core = { workspace = true, features = ["std"] }
@ -37,6 +45,9 @@ image = { workspace = true, optional = true, features = ["png"] }
pb-rs = { version = "0.10.0", optional = true, default-features = false }
[dev-dependencies]
slint = { path = "../../../api/rs/slint", default-features = false, features = ["std", "compat-1-2"] }
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" }

View file

@ -19,13 +19,43 @@ path = "lib.rs"
# Note, these features need to be kept in sync (along with their defaults) in
# the C++ crate's CMakeLists.txt
[features]
wayland = ["winit/wayland", "winit/wayland-csd-adwaita", "glutin?/wayland", "glutin-winit?/wayland", "copypasta/wayland", "i-slint-renderer-skia?/wayland", "softbuffer?/wayland", "softbuffer?/wayland-dlopen"]
x11 = ["winit/x11", "glutin?/x11", "glutin?/glx", "glutin-winit?/x11", "glutin-winit?/glx", "copypasta/x11", "i-slint-renderer-skia?/x11", "softbuffer?/x11", "softbuffer?/x11-dlopen"]
renderer-femtovg = ["dep:i-slint-renderer-femtovg", "dep:glutin", "dep:glutin-winit"]
wayland = [
"winit/wayland",
"winit/wayland-csd-adwaita",
"glutin?/wayland",
"glutin-winit?/wayland",
"copypasta/wayland",
"i-slint-renderer-skia?/wayland",
"softbuffer?/wayland",
"softbuffer?/wayland-dlopen",
]
x11 = [
"winit/x11",
"glutin?/x11",
"glutin?/glx",
"glutin-winit?/x11",
"glutin-winit?/glx",
"copypasta/x11",
"i-slint-renderer-skia?/x11",
"softbuffer?/x11",
"softbuffer?/x11-dlopen",
]
renderer-femtovg = [
"dep:i-slint-renderer-femtovg",
"dep:glutin",
"dep:glutin-winit",
]
renderer-skia = ["i-slint-renderer-skia", "winit/rwh_06"]
renderer-skia-opengl = ["renderer-skia", "i-slint-renderer-skia/opengl"]
renderer-skia-vulkan = ["renderer-skia", "i-slint-renderer-skia/vulkan"]
renderer-software = ["dep:softbuffer", "dep:imgref", "dep:rgb", "i-slint-core/software-renderer-systemfonts", "dep:bytemuck", "winit/rwh_06"]
renderer-software = [
"dep:softbuffer",
"dep:imgref",
"dep:rgb",
"i-slint-core/software-renderer-systemfonts",
"dep:bytemuck",
"winit/rwh_06",
]
accessibility = ["dep:accesskit", "dep:accesskit_winit"]
raw-window-handle-06 = ["winit/rwh_06", "i-slint-core/raw-window-handle-06"]
default = []
@ -45,10 +75,14 @@ raw-window-handle = { version = "0.6", features = ["alloc"] }
scopeguard = { version = "1.1.0", default-features = false }
# For the FemtoVG renderer
i-slint-renderer-femtovg = { workspace = true, features = ["default"], optional = true }
i-slint-renderer-femtovg = { workspace = true, features = [
"default",
], optional = true }
# For the Skia renderer
i-slint-renderer-skia = { workspace = true, features = ["default"], optional = true }
i-slint-renderer-skia = { workspace = true, features = [
"default",
], optional = true }
# For the software renderer
softbuffer = { workspace = true, optional = true, default-features = false }
@ -61,12 +95,30 @@ muda = { version = "0.16.0", optional = true}
vtable = { workspace = true }
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true, features=["HtmlInputElement", "HtmlCanvasElement", "Window", "Document", "Event", "KeyboardEvent", "InputEvent", "CompositionEvent", "DomStringMap", "ClipboardEvent", "DataTransfer"] }
web-sys = { workspace = true, features = [
"HtmlInputElement",
"HtmlCanvasElement",
"Window",
"Document",
"Event",
"KeyboardEvent",
"InputEvent",
"CompositionEvent",
"DomStringMap",
"ClipboardEvent",
"DataTransfer",
] }
wasm-bindgen = { version = "0.2" }
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
glutin = { workspace = true, optional = true, default-features = false, features = ["egl", "wgl"] }
glutin-winit = { version = "0.5", optional = true, default-features = false, features = ["egl", "wgl"] }
glutin = { workspace = true, optional = true, default-features = false, features = [
"egl",
"wgl",
] }
glutin-winit = { version = "0.5", optional = true, default-features = false, features = [
"egl",
"wgl",
] }
accesskit = { version = "0.17", optional = true }
accesskit_winit = { version = "0.23", optional = true }
copypasta = { version = "0.10", default-features = false }
@ -84,7 +136,13 @@ objc2-app-kit = { version = "0.3.0" }
cfg_aliases = { workspace = true }
[dev-dependencies]
slint = { path = "../../../api/rs/slint", default-features = false, features = ["std", "compat-1-2", "backend-winit", "renderer-software", "raw-window-handle-06"] }
slint = { path = "../../../api/rs/slint", default-features = false, features = [
"std",
"compat-1-2",
"backend-winit",
"renderer-software",
"raw-window-handle-06",
] }
[package.metadata.docs.rs]
features = ["wayland", "renderer-software", "raw-window-handle-06"]

View file

@ -18,7 +18,13 @@ path = "lib.rs"
[features]
default = []
shared-fontdb = ["dep:fontdb", "dep:libloading", "derive_more", "cfg-if", "dep:ttf-parser"]
shared-fontdb = [
"dep:fontdb",
"dep:libloading",
"derive_more",
"cfg-if",
"dep:ttf-parser",
]
[dependencies]
fontdb = { workspace = true, optional = true }

View file

@ -28,7 +28,13 @@ proc_macro_span = ["quote", "proc-macro2"]
display-diagnostics = ["codemap", "codemap-diagnostic"]
# Enable the support to render images and font in the binary
software-renderer = ["image", "dep:resvg", "fontdue", "i-slint-common/shared-fontdb", "dep:rayon"]
software-renderer = [
"image",
"dep:resvg",
"fontdue",
"i-slint-common/shared-fontdb",
"dep:rayon",
]
# Enable support to embed the fonts as signed distance fields
sdf-fonts = ["dep:fdsm", "dep:ttf-parser-fdsm", "dep:nalgebra", "dep:rayon"]

View file

@ -24,7 +24,23 @@ libm = ["num-traits/libm", "euclid/libm"]
# Allow the viewer to query at runtime information about item types
rtti = []
# Use the standard library
std = ["euclid/std", "once_cell/std", "scoped-tls-hkt", "lyon_path", "lyon_algorithms", "lyon_geom", "lyon_extra", "dep:web-time", "image-decoders", "svg", "raw-window-handle-06?/std", "chrono/std", "chrono/wasmbind", "chrono/clock", "dep:sys-locale"]
std = [
"euclid/std",
"once_cell/std",
"scoped-tls-hkt",
"lyon_path",
"lyon_algorithms",
"lyon_geom",
"lyon_extra",
"dep:web-time",
"image-decoders",
"svg",
"raw-window-handle-06?/std",
"chrono/std",
"chrono/wasmbind",
"chrono/clock",
"dep:sys-locale",
]
# Unsafe feature meaning that there is only one core running and all thread_local are static.
# You can only enable this feature if you are sure that any API of this crate is only called
# from a single core, and not in a interrupt or signal handler.
@ -32,7 +48,12 @@ unsafe-single-threaded = []
unicode = ["unicode-script", "unicode-linebreak"]
software-renderer-systemfonts = ["shared-fontdb", "rustybuzz", "fontdue", "software-renderer"]
software-renderer-systemfonts = [
"shared-fontdb",
"rustybuzz",
"fontdue",
"software-renderer",
]
software-renderer = ["bytemuck", "rustversion"]
image-decoders = ["dep:image", "dep:clru"]
@ -66,7 +87,9 @@ lyon_geom = { version = "1.0", optional = true }
lyon_path = { version = "1.0", optional = true }
lyon_extra = { version = "1.0.1", optional = true }
num-traits = { version = "0.2", default-features = false }
once_cell = { version = "1.5", default-features = false, features = ["critical-section"] }
once_cell = { version = "1.5", default-features = false, features = [
"critical-section",
] }
pin-project = "1"
pin-weak = { version = "1.1", default-features = false }
# Note: the rgb version is extracted in ci.yaml for rustdoc builds
@ -101,7 +124,9 @@ fontdue = { workspace = true, optional = true }
rustversion = { version = "1.0", optional = true }
[target.'cfg(target_family = "unix")'.dependencies]
gettext-rs = { version = "0.7.1", optional = true, features = ["gettext-system"] }
gettext-rs = { version = "0.7.1", optional = true, features = [
"gettext-system",
] }
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-time = { version = "1.0", optional = true }
@ -112,19 +137,32 @@ web-sys = { workspace = true, features = [ "HtmlImageElement" ] }
fontdb = { workspace = true, optional = true, default-features = true }
[dev-dependencies]
slint = { path = "../../api/rs/slint", default-features = false, features = ["std", "compat-1-2"] }
slint = { path = "../../api/rs/slint", default-features = false, features = [
"std",
"compat-1-2",
] }
i-slint-backend-testing = { path = "../backends/testing" }
rustybuzz = { workspace = true }
ttf-parser = { workspace = true }
fontdb = { workspace = true, default-features = true }
serde_json = { workspace = true }
tiny-skia = "0.11.0"
tokio = { version = "1.35", features = ["rt-multi-thread", "macros", "time", "net", "io-util"] }
tokio = { version = "1.35", features = [
"rt-multi-thread",
"macros",
"time",
"net",
"io-util",
] }
async-compat = { version = "0.2.4" }
tempfile = { version = "3.12.0" }
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ["cfg(slint_debug_property)", "cfg(cbindgen)", "cfg(slint_int_coord)"] }
unexpected_cfgs = { level = "warn", check-cfg = [
"cfg(slint_debug_property)",
"cfg(cbindgen)",
"cfg(slint_int_coord)",
] }
[lints.clippy]
# Coord is an alias for f32 in most architectures, but not always, so the cast

View file

@ -20,7 +20,13 @@ path = "lib.rs"
[features]
default = ["backend-default", "renderer-femtovg", "renderer-software", "accessibility", "compat-1-2"]
default = [
"backend-default",
"renderer-femtovg",
"renderer-software",
"accessibility",
"compat-1-2",
]
## Mandatory feature:
## This feature is required to keep the compatibility with Slint 1.2
@ -66,7 +72,10 @@ 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"]
backend-winit-wayland = [
"i-slint-backend-selector/backend-winit-wayland",
"std",
]
## KMS with Vulkan or EGL and libinput on Linux are used to render the application in full screen mode, without any
## windowing system. Requires libseat. If you don't have libseat, select `backend-linuxkms-noseat` instead. (Experimental)
@ -74,7 +83,10 @@ backend-linuxkms = ["i-slint-backend-selector/backend-linuxkms", "std"]
## KMS with Vulkan or EGL and libinput on Linux are used to render the application in full screen mode, without any
## windowing system. Requires libseat. (Experimental)
backend-linuxkms-noseat = ["i-slint-backend-selector/backend-linuxkms-noseat", "std"]
backend-linuxkms-noseat = [
"i-slint-backend-selector/backend-linuxkms-noseat",
"std",
]
## Alias to a backend and renderer that depends on the platform.
## Will select the Qt backend on linux if present, and the winit otherwise
@ -114,7 +126,10 @@ accessibility = ["i-slint-backend-selector/accessibility"]
## [`Window::window_handle()`] function that returns a struct that implements
## [HasWindowHandle](raw_window_handle_06::HasWindowHandle) and
## [HasDisplayHandle](raw_window_handle_06::HasDisplayHandle) implementation.
raw-window-handle-06 = ["dep:raw-window-handle-06", "i-slint-backend-selector/raw-window-handle-06"]
raw-window-handle-06 = [
"dep:raw-window-handle-06",
"i-slint-backend-selector/raw-window-handle-06",
]
## Features used internally by Slint tooling that are not stable and come without
## any stability guarantees whatsoever.
@ -155,7 +170,9 @@ web-sys = { workspace = true, features=[ "Navigator" ] }
[target.'cfg(target_os = "linux")'.dependencies]
# this line is there to add the "enable" feature by default, but only on linux
i-slint-backend-qt = { workspace = true, features = [ "enable" ], optional = true }
i-slint-backend-qt = { workspace = true, features = [
"enable",
], optional = true }
[dev-dependencies]
i-slint-backend-testing = { path = "../../internal/backends/testing" }

View file

@ -19,7 +19,11 @@ path = "lib.rs"
default = []
[dependencies]
i-slint-core = { workspace = true, features = ["default", "box-shadow-cache", "shared-fontdb"] }
i-slint-core = { workspace = true, features = [
"default",
"box-shadow-cache",
"shared-fontdb",
] }
i-slint-core-macros = { workspace = true, features = ["default"] }
i-slint-common = { workspace = true, features = ["default"] }
@ -49,5 +53,13 @@ core-foundation = { version = "0.9.1" }
core-text = { version = "20.1.0" }
[target.'cfg(target_arch = "wasm32")'.dependencies]
web-sys = { workspace = true, features=["console", "WebGlContextAttributes", "CanvasRenderingContext2d", "HtmlInputElement", "HtmlCanvasElement", "Window", "Document"] }
web-sys = { workspace = true, features = [
"console",
"WebGlContextAttributes",
"CanvasRenderingContext2d",
"HtmlInputElement",
"HtmlCanvasElement",
"Window",
"Document",
] }
wasm-bindgen = { version = "0.2" }

View file

@ -49,7 +49,10 @@ ash = { version = "^0.37.2", optional = true }
vulkano = { version = "0.34.0", optional = true, default-features = false }
[target.'cfg(not(target_os = "ios"))'.dependencies]
glutin = { workspace = true, default-features = false, features = ["egl", "wgl"] }
glutin = { workspace = true, default-features = false, features = [
"egl",
"wgl",
] }
[target.'cfg(not(target_os = "android"))'.dependencies]
# software renderer fallback
@ -57,7 +60,18 @@ softbuffer = { workspace = true, default-features = false }
bytemuck = { workspace = true }
[target.'cfg(target_family = "windows")'.dependencies]
windows = { version = "0.61.1", features = ["Win32", "Win32_System_Com", "Win32_Graphics", "Win32_Graphics_Dxgi", "Win32_Graphics_Direct3D12", "Win32_Graphics_Direct3D", "Win32_Foundation", "Win32_Graphics_Dxgi_Common", "Win32_System_Threading", "Win32_Security"] }
windows = { version = "0.61.1", features = [
"Win32",
"Win32_System_Com",
"Win32_Graphics",
"Win32_Graphics_Dxgi",
"Win32_Graphics_Direct3D12",
"Win32_Graphics_Direct3D",
"Win32_Foundation",
"Win32_Graphics_Dxgi_Common",
"Win32_System_Threading",
"Win32_Security",
] }
skia-safe = { version = "0.84.0", features = ["d3d"] }
[target.'cfg(target_vendor = "apple")'.dependencies]
@ -87,7 +101,7 @@ objc2-app-kit = { version = "0.3.0", default-features = false, features = [
"NSView",
] }
objc2-core-foundation = { version = "0.3.0", default-features = false, features = [
"CFCGTypes"
"CFCGTypes",
] }
skia-safe = { version = "0.84.0", features = ["metal"] }
raw-window-metal = "1.0"

View file

@ -20,5 +20,8 @@ name = "doctests"
walkdir = "2"
[dev-dependencies]
slint-interpreter = { workspace = true, features = ["default", "display-diagnostics"] }
slint-interpreter = { workspace = true, features = [
"default",
"display-diagnostics",
] }
spin_on = { workspace = true }

View file

@ -21,7 +21,12 @@ name = "test-driver-cpp"
slint-cpp = { workspace = true, features = ["testing", "std", "experimental"] }
[dev-dependencies]
i-slint-compiler = { workspace = true, features = ["default", "cpp", "display-diagnostics", "bundle-translations"] }
i-slint-compiler = { workspace = true, features = [
"default",
"cpp",
"display-diagnostics",
"bundle-translations",
] }
cc = "1.0.54"
scopeguard = "1.1.0"

View file

@ -18,7 +18,10 @@ path = "main.rs"
name = "test-driver-interpreter"
[dev-dependencies]
slint-interpreter = { workspace = true, features = ["display-diagnostics", "compat-1-2"] }
slint-interpreter = { workspace = true, features = [
"display-diagnostics",
"compat-1-2",
] }
i-slint-backend-testing = { workspace = true }
itertools = { workspace = true }

View file

@ -23,11 +23,20 @@ build-time = ["i-slint-compiler", "spin_on"]
[dependencies]
slint = { workspace = true, features = ["std", "compat-1-2"] }
i-slint-backend-testing = { workspace = true, features = ["internal"] }
slint-interpreter = { workspace = true, features = ["std", "compat-1-2", "internal"] }
slint-interpreter = { workspace = true, features = [
"std",
"compat-1-2",
"internal",
] }
spin_on = { workspace = true }
[build-dependencies]
i-slint-compiler = { workspace = true, features = ["default", "rust", "display-diagnostics", "bundle-translations"], optional = true}
i-slint-compiler = { workspace = true, features = [
"default",
"rust",
"display-diagnostics",
"bundle-translations",
], optional = true }
spin_on = { workspace = true, optional = true }
test_driver_lib = { path = "../driverlib" }

View file

@ -25,7 +25,12 @@ image = { workspace = true }
crossterm = "0.28"
[build-dependencies]
i-slint-compiler = { workspace = true, features = ["default", "rust", "display-diagnostics", "software-renderer"] }
i-slint-compiler = { workspace = true, features = [
"default",
"rust",
"display-diagnostics",
"software-renderer",
] }
walkdir = "2.3"
spin_on = { workspace = true }
test_driver_lib = { path = "../driver/driverlib" }

View file

@ -26,7 +26,13 @@ sdf-fonts = ["i-slint-compiler/sdf-fonts"]
default = ["software-renderer", "jemalloc"]
[dependencies]
i-slint-compiler = { workspace = true, features = ["default", "display-diagnostics", "bundle-translations", "cpp", "rust"]}
i-slint-compiler = { workspace = true, features = [
"default",
"display-diagnostics",
"bundle-translations",
"cpp",
"rust",
] }
clap = { workspace = true }
proc-macro2 = "1.0.11"

View file

@ -17,7 +17,12 @@ keywords = ["viewer", "gui", "ui", "toolkit"]
[dependencies]
i-slint-compiler = { workspace = true }
i-slint-core = { workspace = true }
slint-interpreter = { workspace = true, features = ["display-diagnostics", "compat-1-2", "internal", "accessibility"] }
slint-interpreter = { workspace = true, features = [
"display-diagnostics",
"compat-1-2",
"internal",
"accessibility",
] }
i-slint-renderer-skia = { workspace = true, features = ["default", "wayland"] }
clap = { workspace = true }

View file

@ -68,13 +68,27 @@ preview-lense = []
## to provide an implementation of the external preview API when building for WASM)
preview-api = ["preview-external"]
## Build in the actual code to act as a preview for slint files.
preview-engine = ["dep:slint", "dep:slint-interpreter", "dep:i-slint-core", "dep:i-slint-backend-selector", "dep:slint-build", "dep:i-slint-backend-winit", "dep:muda", "dep:objc2-foundation"]
preview-engine = [
"dep:slint",
"dep:slint-interpreter",
"dep:i-slint-core",
"dep:i-slint-backend-selector",
"dep:slint-build",
"dep:i-slint-backend-winit",
"dep:muda",
"dep:objc2-foundation",
]
## Build in the actual code to act as a preview for slint files. Does nothing in WASM!
preview-builtin = ["preview-engine"]
## Support the external preview optionally used by e.g. the VSCode plugin
preview-external = []
default = ["backend-default", "renderer-femtovg", "renderer-software", "preview"]
default = [
"backend-default",
"renderer-femtovg",
"renderer-software",
"preview",
]
[dependencies]
i-slint-compiler = { workspace = true, features = ["display-diagnostics"] }
@ -93,7 +107,13 @@ smol_str = { workspace = true }
i-slint-backend-selector = { workspace = true, optional = true }
i-slint-core = { workspace = true, features = ["std"], optional = true }
slint = { workspace = true, features = ["compat-1-2"], optional = true }
slint-interpreter = { workspace = true, features = ["compat-1-2", "internal", "internal-highlight", "internal-json", "image-default-formats"], optional = true }
slint-interpreter = { workspace = true, features = [
"compat-1-2",
"internal",
"internal-highlight",
"internal-json",
"image-default-formats",
], optional = true }
[target.'cfg(not(any(target_os = "windows", target_arch = "wasm32")))'.dependencies]
tikv-jemallocator = { workspace = true }

View file

@ -15,7 +15,10 @@ version.workspace = true
categories = ["gui", "command-line-utilities", "development-tools"]
[dependencies]
i-slint-compiler = { workspace = true, features = ["default", "display-diagnostics"] }
i-slint-compiler = { workspace = true, features = [
"default",
"display-diagnostics",
] }
chrono = { version = "0.4.24", default-features = false, features = ["clock"] }
clap = { workspace = true }
polib = "0.2"

View file

@ -17,7 +17,10 @@ categories = ["gui", "development-tools", "command-line-utilities"]
[dependencies]
i-slint-compiler = { workspace = true, features = ["default", "display-diagnostics"] }
i-slint-compiler = { workspace = true, features = [
"default",
"display-diagnostics",
] }
clap = { workspace = true }
codemap = "0.1"

View file

@ -53,13 +53,22 @@ default = ["backend-default", "renderer-femtovg", "renderer-software"]
[dependencies]
i-slint-compiler = { workspace = true }
i-slint-core = { workspace = true }
slint-interpreter = { workspace = true, features = ["display-diagnostics", "compat-1-2", "internal", "accessibility", "image-default-formats", "internal-json"] }
slint-interpreter = { workspace = true, features = [
"display-diagnostics",
"compat-1-2",
"internal",
"accessibility",
"image-default-formats",
"internal-json",
] }
i-slint-backend-selector = { workspace = true }
clap = { workspace = true }
codemap = "0.1"
codemap-diagnostic = "0.1.1"
notify = { version = "8.0.0", default-features = false, features = ["macos_kqueue"] }
notify = { version = "8.0.0", default-features = false, features = [
"macos_kqueue",
] }
shlex = "1"
spin_on = { workspace = true }
env_logger = "0.11.0"