diff --git a/.cargo/config.toml b/.cargo/config.toml index 1217a2a53..4c90f1c87 100644 --- a/.cargo/config.toml +++ b/.cargo/config.toml @@ -6,15 +6,17 @@ xtask = "run --package xtask --" [target.xtensa-esp32s3-none-elf] rustflags = [ - # Recommended by the esp-backtrace crate used for panic handler - "-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", + # Recommended by the esp-backtrace crate used for panic handler + "-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", ] [target.xtensa-esp32s2-none-elf] rustflags = [ - # Enable the atomic codegen option for Xtensa - "-C", - "target-feature=+s32c1i", + # Enable the atomic codegen option for Xtensa + "-C", + "target-feature=+s32c1i", ] diff --git a/.mise/config.toml b/.mise/config.toml index 0f9766179..154603239 100644 --- a/.mise/config.toml +++ b/.mise/config.toml @@ -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" ] +includes = [".mise/tasks.toml", ".mise/tasks"] diff --git a/.mise/tasks.toml b/.mise/tasks.toml index c5da45ac1..396fc8abd 100644 --- a/.mise/tasks.toml +++ b/.mise/tasks.toml @@ -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,8 +49,12 @@ 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" ] -outputs = [ "tools/lsp/pkg/*" ] +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" } depends = ["prepare:pnpm-install"] @@ -54,8 +62,11 @@ 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" ] -outputs = [ "api/wasm-interpreter/pkg/*" ] +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" } depends = ["prepare:pnpm-install"] @@ -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" diff --git a/Cargo.toml b/Cargo.toml index ee7f0d0c8..27adfeb61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -3,100 +3,100 @@ [workspace] members = [ - 'api/cpp', - 'api/node', - 'api/rs/build', - 'api/rs/macros', - 'api/rs/slint', - 'api/python', - 'api/wasm-interpreter', - 'examples/7guis', - 'examples/gallery', - 'examples/imagefilter/rust', - 'examples/maps', - 'examples/memory', - 'examples/opengl_underlay', - 'examples/opengl_texture', - 'examples/ffmpeg', - 'examples/gstreamer-player', - 'examples/plotter', - 'demos/printerdemo/rust', - 'demos/printerdemo_mcu', - 'examples/slide_puzzle', - 'examples/todo/rust', - 'examples/todo-mvc/rust', - 'examples/virtual_keyboard/rust', - 'examples/carousel/rust', - 'demos/energy-monitor', - 'demos/home-automation/rust', - 'examples/mcu-board-support', - 'examples/mcu-embassy', - 'examples/uefi-demo', - 'demos/weather-demo', - 'demos/usecases/rust', - 'helper_crates/const-field-offset', - 'helper_crates/vtable', - 'helper_crates/vtable/macro', - 'internal/backends/winit', - 'internal/backends/android-activity', - 'internal/backends/qt', - 'internal/backends/selector', - 'internal/backends/testing', - 'internal/backends/linuxkms', - 'internal/renderers/skia', - 'internal/renderers/femtovg', - 'internal/common', - 'internal/compiler', - 'internal/compiler/parser-test-macro', - 'internal/core', - 'internal/core-macros', - 'internal/interpreter', - 'tests/doctests', - 'tests/driver/cpp', - 'tests/driver/driverlib', - 'tests/driver/interpreter', - 'tests/driver/nodejs', - 'tests/driver/rust', - 'tests/screenshots', - 'tests/manual/windowattributes', - 'tools/compiler', - 'tools/docsnapper', - 'tools/figma_import', - 'tools/lsp', - 'tools/updater', - 'tools/viewer', - 'tools/tr-extractor', - 'xtask', + 'api/cpp', + 'api/node', + 'api/rs/build', + 'api/rs/macros', + 'api/rs/slint', + 'api/python', + 'api/wasm-interpreter', + 'examples/7guis', + 'examples/gallery', + 'examples/imagefilter/rust', + 'examples/maps', + 'examples/memory', + 'examples/opengl_underlay', + 'examples/opengl_texture', + 'examples/ffmpeg', + 'examples/gstreamer-player', + 'examples/plotter', + 'demos/printerdemo/rust', + 'demos/printerdemo_mcu', + 'examples/slide_puzzle', + 'examples/todo/rust', + 'examples/todo-mvc/rust', + 'examples/virtual_keyboard/rust', + 'examples/carousel/rust', + 'demos/energy-monitor', + 'demos/home-automation/rust', + 'examples/mcu-board-support', + 'examples/mcu-embassy', + 'examples/uefi-demo', + 'demos/weather-demo', + 'demos/usecases/rust', + 'helper_crates/const-field-offset', + 'helper_crates/vtable', + 'helper_crates/vtable/macro', + 'internal/backends/winit', + 'internal/backends/android-activity', + 'internal/backends/qt', + 'internal/backends/selector', + 'internal/backends/testing', + 'internal/backends/linuxkms', + 'internal/renderers/skia', + 'internal/renderers/femtovg', + 'internal/common', + 'internal/compiler', + 'internal/compiler/parser-test-macro', + 'internal/core', + 'internal/core-macros', + 'internal/interpreter', + 'tests/doctests', + 'tests/driver/cpp', + 'tests/driver/driverlib', + 'tests/driver/interpreter', + 'tests/driver/nodejs', + 'tests/driver/rust', + 'tests/screenshots', + 'tests/manual/windowattributes', + 'tools/compiler', + 'tools/docsnapper', + 'tools/figma_import', + 'tools/lsp', + 'tools/updater', + 'tools/viewer', + 'tools/tr-extractor', + 'xtask', ] default-members = [ - 'api/rs/build', - 'api/rs/slint', - 'examples/gallery', - 'examples/memory', - 'demos/printerdemo/rust', - 'examples/slide_puzzle', - 'examples/todo/rust', - 'examples/virtual_keyboard/rust', - 'examples/carousel/rust', - 'demos/energy-monitor', - 'internal/backends/winit', - 'internal/backends/qt', - 'internal/backends/selector', - 'internal/compiler', - 'internal/core', - 'internal/interpreter', - 'tests/doctests', - 'tests/driver/interpreter', - 'tests/driver/rust', - 'tests/screenshots', - 'tools/compiler', - 'tools/figma_import', - 'tools/lsp', - 'tools/viewer', + 'api/rs/build', + 'api/rs/slint', + 'examples/gallery', + 'examples/memory', + 'demos/printerdemo/rust', + 'examples/slide_puzzle', + 'examples/todo/rust', + 'examples/virtual_keyboard/rust', + 'examples/carousel/rust', + 'demos/energy-monitor', + 'internal/backends/winit', + 'internal/backends/qt', + 'internal/backends/selector', + 'internal/compiler', + 'internal/core', + 'internal/interpreter', + 'tests/doctests', + 'tests/driver/interpreter', + 'tests/driver/rust', + 'tests/screenshots', + 'tools/compiler', + 'tools/figma_import', + 'tools/lsp', + 'tools/viewer', ] -resolver="2" +resolver = "2" [workspace.package] description = "GUI toolkit to efficiently develop fluid graphical user interfaces for embedded devices and desktop applications" @@ -113,7 +113,7 @@ version = "1.11.0" [workspace.dependencies] i-slint-backend-android-activity = { version = "=1.11.0", path = "internal/backends/android-activity", default-features = false } i-slint-backend-linuxkms = { version = "=1.11.0", path = "internal/backends/linuxkms", default-features = false } -i-slint-backend-qt = { version = "=1.11.0", path="internal/backends/qt", default-features = false } +i-slint-backend-qt = { version = "=1.11.0", path = "internal/backends/qt", default-features = false } i-slint-backend-selector = { version = "=1.11.0", path = "internal/backends/selector", default-features = false } i-slint-backend-testing = { version = "=1.11.0", path = "internal/backends/testing", default-features = false } i-slint-backend-winit = { version = "=1.11.0", path = "internal/backends/winit", default-features = false } @@ -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" } diff --git a/Cross.toml b/Cross.toml index 7f2fc7dfd..94351e6d9 100644 --- a/Cross.toml +++ b/Cross.toml @@ -12,8 +12,8 @@ image = "ghcr.io/slint-ui/slint/x86_64-unknown-linux-gnu" [build.env] passthrough = [ - "SLINT_NO_QT", - "SLINT_STYLE", - "SLINT_TEST_FILTER", - "SLINT_INTERPRETER_ERROR_WHITELIST", + "SLINT_NO_QT", + "SLINT_STYLE", + "SLINT_TEST_FILTER", + "SLINT_INTERPRETER_ERROR_WHITELIST", ] diff --git a/REUSE.toml b/REUSE.toml index 11a6d7468..5056f1da7 100644 --- a/REUSE.toml +++ b/REUSE.toml @@ -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 " @@ -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 " diff --git a/about.toml b/about.toml index 72bf9f5d1..f1a256cea 100644 --- a/about.toml +++ b/about.toml @@ -2,26 +2,26 @@ # SPDX-License-Identifier: GPL-3.0-only OR LicenseRef-Slint-Royalty-free-2.0 OR LicenseRef-Slint-Software-3.0 accepted = [ - "MIT", - "Apache-2.0", - "Apache-2.0 WITH LLVM-exception", - "MPL-2.0", - "Zlib", - "BSD-2-Clause", - "BSD-3-Clause", - "CC0-1.0", - "BSL-1.0", - "ISC", - "Unicode-DFS-2016", - "Unicode-3.0", - "OpenSSL", - "WTFPL", - "LicenseRef-Slint-Software-3.0", + "MIT", + "Apache-2.0", + "Apache-2.0 WITH LLVM-exception", + "MPL-2.0", + "Zlib", + "BSD-2-Clause", + "BSD-3-Clause", + "CC0-1.0", + "BSL-1.0", + "ISC", + "Unicode-DFS-2016", + "Unicode-3.0", + "OpenSSL", + "WTFPL", + "LicenseRef-Slint-Software-3.0", ] targets = [ - "x86_64-unknown-linux-gnu", - "x86_64-pc-windows-msvc", - "x86_64-apple-darwin", + "x86_64-unknown-linux-gnu", + "x86_64-pc-windows-msvc", + "x86_64-apple-darwin", ] ignore-dev-dependencies = true filter-noassertion = true diff --git a/api/cpp/Cargo.toml b/api/cpp/Cargo.toml index c9f3c4040..ee2b0fac7 100644 --- a/api/cpp/Cargo.toml +++ b/api/cpp/Cargo.toml @@ -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] diff --git a/api/node/Cargo.toml b/api/node/Cargo.toml index 159fcc260..7da1d05ad 100644 --- a/api/node/Cargo.toml +++ b/api/node/Cargo.toml @@ -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 } diff --git a/api/python/Cargo.toml b/api/python/Cargo.toml index 06ccc1b33..3c0ed8ade 100644 --- a/api/python/Cargo.toml +++ b/api/python/Cargo.toml @@ -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 } diff --git a/api/python/pyproject.toml b/api/python/pyproject.toml index f0f2e8691..246db1e2d 100644 --- a/api/python/pyproject.toml +++ b/api/python/pyproject.toml @@ -9,30 +9,26 @@ 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", - "Environment :: X11 Applications", - "Environment :: Win32 (MS Windows)", - "Intended Audience :: Developers", - "Programming Language :: Python", - "Programming Language :: Rust", - "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", - "License :: Other/Proprietary License", - "Topic :: Software Development", - "Topic :: Software Development :: Libraries :: Application Frameworks", - "Topic :: Software Development :: User Interfaces", - "Topic :: Software Development :: Widget Sets", - "Programming Language :: Python", - "Programming Language :: Python :: 3", - "Programming Language :: Python :: 3.10", -] -dependencies = [ - "maturin>=1.8.2", + "Development Status :: 3 - Alpha", + "Environment :: MacOS X", + "Environment :: X11 Applications", + "Environment :: Win32 (MS Windows)", + "Intended Audience :: Developers", + "Programming Language :: Python", + "Programming Language :: Rust", + "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", + "License :: Other/Proprietary License", + "Topic :: Software Development", + "Topic :: Software Development :: Libraries :: Application Frameworks", + "Topic :: Software Development :: User Interfaces", + "Topic :: Software Development :: Widget Sets", + "Programming Language :: Python", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.10", ] +dependencies = ["maturin>=1.8.2"] [project.urls] Homepage = "https://slint.dev" @@ -46,19 +42,23 @@ dev = ["pytest"] [dependency-groups] dev = [ - "mypy>=1.15.0", - "nox>=2024.10.9", - "pdoc>=15.0.1", - "pytest>=8.3.4", - "ruff>=0.9.6", + "mypy>=1.15.0", + "nox>=2024.10.9", + "pdoc>=15.0.1", + "pytest>=8.3.4", + "ruff>=0.9.6", ] [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' } [tool.mypy] -strict=true -disallow_subclassing_any=false +strict = true +disallow_subclassing_any = false diff --git a/api/rs/build/Cargo.toml b/api/rs/build/Cargo.toml index cb7fbc0db..9868ef743 100644 --- a/api/rs/build/Cargo.toml +++ b/api/rs/build/Cargo.toml @@ -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 } diff --git a/api/rs/macros/Cargo.toml b/api/rs/macros/Cargo.toml index 88659547e..583df08b2 100644 --- a/api/rs/macros/Cargo.toml +++ b/api/rs/macros/Cargo.toml @@ -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" diff --git a/api/rs/slint/Cargo.toml b/api/rs/slint/Cargo.toml index 779df8aab..824e8206a 100644 --- a/api/rs/slint/Cargo.toml +++ b/api/rs/slint/Cargo.toml @@ -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 @@ -142,12 +155,16 @@ backend-default = ["i-slint-backend-selector/default", "i-slint-backend-qt"] # deprecated aliases renderer-winit-femtovg = ["renderer-femtovg"] renderer-winit-skia = ["renderer-skia"] -renderer-winit-skia-opengl= ["renderer-skia-opengl"] -renderer-winit-skia-vulkan= ["renderer-skia-vulkan"] +renderer-winit-skia-opengl = ["renderer-skia-opengl"] +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-renderer-skia = { path = "../../../internal/renderers/skia" } +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", +] diff --git a/api/wasm-interpreter/Cargo.toml b/api/wasm-interpreter/Cargo.toml index 5cf4d3489..ac2c73d59 100644 --- a/api/wasm-interpreter/Cargo.toml +++ b/api/wasm-interpreter/Cargo.toml @@ -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" diff --git a/demos/energy-monitor/Cargo.toml b/demos/energy-monitor/Cargo.toml index 80e30a0a6..5c1474e89 100644 --- a/demos/energy-monitor/Cargo.toml +++ b/demos/energy-monitor/Cargo.toml @@ -14,22 +14,38 @@ 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 } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = { version = "0.2" } -web-sys = { version = "0.3", features=["console"] } +web-sys = { version = "0.3", features = ["console"] } console_error_panic_hook = "0.1.5" [build-dependencies] 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"] diff --git a/demos/home-automation/rust/Cargo.toml b/demos/home-automation/rust/Cargo.toml index abdd2a672..c6ba3b53b 100644 --- a/demos/home-automation/rust/Cargo.toml +++ b/demos/home-automation/rust/Cargo.toml @@ -23,5 +23,5 @@ slint = { path = "../../../api/rs/slint" } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = { version = "0.2" } -web-sys = { version = "0.3", features=["console"] } +web-sys = { version = "0.3", features = ["console"] } console_error_panic_hook = "0.1.5" diff --git a/demos/printerdemo/python/pyproject.toml b/demos/printerdemo/python/pyproject.toml index 82ef61bf2..e2d9412d3 100644 --- a/demos/printerdemo/python/pyproject.toml +++ b/demos/printerdemo/python/pyproject.toml @@ -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 } diff --git a/demos/printerdemo/rust/Cargo.toml b/demos/printerdemo/rust/Cargo.toml index 3ba188d7b..edc68ad4c 100644 --- a/demos/printerdemo/rust/Cargo.toml +++ b/demos/printerdemo/rust/Cargo.toml @@ -20,21 +20,21 @@ 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"] } +slint = { path = "../../../api/rs/slint", features = ["gettext"] } [build-dependencies] slint-build = { path = "../../../api/rs/build" } [target.'cfg(target_arch = "wasm32")'.dependencies] wasm-bindgen = { version = "0.2" } -web-sys = { version = "0.3", features=["console"] } +web-sys = { version = "0.3", features = ["console"] } console_error_panic_hook = "0.1.5" - - - - - diff --git a/demos/printerdemo_mcu/Cargo.toml b/demos/printerdemo_mcu/Cargo.toml index f7c27cee4..e974d7dee 100644 --- a/demos/printerdemo_mcu/Cargo.toml +++ b/demos/printerdemo_mcu/Cargo.toml @@ -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] diff --git a/demos/usecases/rust/Cargo.toml b/demos/usecases/rust/Cargo.toml index 7df062c89..40b403b1e 100644 --- a/demos/usecases/rust/Cargo.toml +++ b/demos/usecases/rust/Cargo.toml @@ -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" } - - diff --git a/demos/weather-demo/Cargo.toml b/demos/weather-demo/Cargo.toml index 2db3262e8..c4c8062e3 100644 --- a/demos/weather-demo/Cargo.toml +++ b/demos/weather-demo/Cargo.toml @@ -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" @@ -57,7 +61,7 @@ path = "src/main.rs" [package.metadata.android] package = "dev.slint.examples.weatherdemo" resources = "android-res" -build_targets = [ "aarch64-linux-android" ] +build_targets = ["aarch64-linux-android"] [package.metadata.android.application] label = "Weather Demo" diff --git a/examples/7guis/Cargo.toml b/examples/7guis/Cargo.toml index 69943858e..3ba9cd142 100644 --- a/examples/7guis/Cargo.toml +++ b/examples/7guis/Cargo.toml @@ -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", +] } diff --git a/examples/carousel/rust/Cargo.toml b/examples/carousel/rust/Cargo.toml index d74d0e42c..0f8b0220e 100644 --- a/examples/carousel/rust/Cargo.toml +++ b/examples/carousel/rust/Cargo.toml @@ -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. diff --git a/examples/ffmpeg/Cargo.toml b/examples/ffmpeg/Cargo.toml index 31f5b0a0c..ad3b18655 100644 --- a/examples/ffmpeg/Cargo.toml +++ b/examples/ffmpeg/Cargo.toml @@ -23,8 +23,7 @@ futures = { version = "0.3.28" } cpal = "0.15.2" ringbuf = "0.3.3" bytemuck = "1.13.1" -derive_more = { workspace = true} +derive_more = { workspace = true } [build-dependencies] slint-build = { path = "../../api/rs/build" } - diff --git a/examples/gallery/Cargo.toml b/examples/gallery/Cargo.toml index 836a9547b..512ce0231 100644 --- a/examples/gallery/Cargo.toml +++ b/examples/gallery/Cargo.toml @@ -16,7 +16,7 @@ path = "main.rs" name = "gallery" [dependencies] -slint = { path = "../../api/rs/slint", features=["gettext"] } +slint = { path = "../../api/rs/slint", features = ["gettext"] } [build-dependencies] slint-build = { path = "../../api/rs/build" } diff --git a/examples/gstreamer-player/Cargo.toml b/examples/gstreamer-player/Cargo.toml index e85cbe7d5..7fd66d123 100644 --- a/examples/gstreamer-player/Cargo.toml +++ b/examples/gstreamer-player/Cargo.toml @@ -19,10 +19,10 @@ slint = { path = "../../api/rs/slint" } anyhow = { version = "1.0" } futures = { version = "0.3.28" } -gst = {package = "gstreamer", version = "0.23.0"} -gst-audio = {package = "gstreamer-audio", version = "0.23.0" } -gst-video = {package = "gstreamer-video", version = "0.23.0" } -gst-app = {package = "gstreamer-app", version = "0.23.0" } +gst = { package = "gstreamer", version = "0.23.0" } +gst-audio = { package = "gstreamer-audio", version = "0.23.0" } +gst-video = { package = "gstreamer-video", version = "0.23.0" } +gst-app = { package = "gstreamer-app", version = "0.23.0" } [target.'cfg(target_os = "linux")'.dependencies] gst-gl = { package = "gstreamer-gl", version = "0.23.0" } @@ -32,4 +32,3 @@ glutin_egl_sys = "0.7.1" [build-dependencies] slint-build = { path = "../../api/rs/build" } cfg_aliases = { workspace = true } - diff --git a/examples/maps/Cargo.toml b/examples/maps/Cargo.toml index ca9707854..91fa5dba5 100644 --- a/examples/maps/Cargo.toml +++ b/examples/maps/Cargo.toml @@ -18,5 +18,3 @@ slint = { path = "../../api/rs/slint" } image = { workspace = true } reqwest = { version = "0.12" } tokio = { version = "1", features = ["full"] } - - diff --git a/examples/mcu-board-support/Cargo.toml b/examples/mcu-board-support/Cargo.toml index 9bbd4b352..b1d16bf5e 100644 --- a/examples/mcu-board-support/Cargo.toml +++ b/examples/mcu-board-support/Cargo.toml @@ -11,21 +11,104 @@ publish = false description = "Internal helper that includes support for different MCUs, for use in Slint examples" repository = "https://github.com/slint-ui/slint" homepage = "https://slint.dev" -links = "mcu_board_support" # just so we can pass metadata to the slint build crate +links = "mcu_board_support" # just so we can pass metadata to the slint build crate [lib] 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,11 +147,14 @@ 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 } -embedded-graphics-core = { version = "0.4", optional = true } +embedded-graphics-core = { version = "0.4", optional = true } defmt-rtt = { version = "0.4.0", optional = true } defmt = { version = "0.3.0", optional = true } diff --git a/examples/mcu-board-support/esp32_s3_box/cargo-config.toml b/examples/mcu-board-support/esp32_s3_box/cargo-config.toml index ce3965c48..15b65d46a 100644 --- a/examples/mcu-board-support/esp32_s3_box/cargo-config.toml +++ b/examples/mcu-board-support/esp32_s3_box/cargo-config.toml @@ -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] diff --git a/examples/mcu-board-support/pico2_st7789/board_config.toml b/examples/mcu-board-support/pico2_st7789/board_config.toml index 3ec4da5d6..410f6b9a8 100644 --- a/examples/mcu-board-support/pico2_st7789/board_config.toml +++ b/examples/mcu-board-support/pico2_st7789/board_config.toml @@ -1,16 +1,8 @@ # Copyright © SixtyFPS GmbH # 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 = ["."] diff --git a/examples/mcu-board-support/pico_st7789/board_config.toml b/examples/mcu-board-support/pico_st7789/board_config.toml index 894bd68fb..e69abd228 100644 --- a/examples/mcu-board-support/pico_st7789/board_config.toml +++ b/examples/mcu-board-support/pico_st7789/board_config.toml @@ -1,11 +1,5 @@ # Copyright © SixtyFPS GmbH # SPDX-License-Identifier: MIT -link_args = [ - "--nmagic", - "-Tlink.x", - "-Tdefmt.x", -] -link_search_path = [ - "." -] +link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"] +link_search_path = ["."] diff --git a/examples/mcu-board-support/stm32h735g/board_config.toml b/examples/mcu-board-support/stm32h735g/board_config.toml index 894bd68fb..e69abd228 100644 --- a/examples/mcu-board-support/stm32h735g/board_config.toml +++ b/examples/mcu-board-support/stm32h735g/board_config.toml @@ -1,11 +1,5 @@ # Copyright © SixtyFPS GmbH # SPDX-License-Identifier: MIT -link_args = [ - "--nmagic", - "-Tlink.x", - "-Tdefmt.x", -] -link_search_path = [ - "." -] +link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"] +link_search_path = ["."] diff --git a/examples/mcu-board-support/stm32u5g9j_dk2/board_config.toml b/examples/mcu-board-support/stm32u5g9j_dk2/board_config.toml index 894bd68fb..e69abd228 100644 --- a/examples/mcu-board-support/stm32u5g9j_dk2/board_config.toml +++ b/examples/mcu-board-support/stm32u5g9j_dk2/board_config.toml @@ -1,11 +1,5 @@ # Copyright © SixtyFPS GmbH # SPDX-License-Identifier: MIT -link_args = [ - "--nmagic", - "-Tlink.x", - "-Tdefmt.x", -] -link_search_path = [ - "." -] +link_args = ["--nmagic", "-Tlink.x", "-Tdefmt.x"] +link_search_path = ["."] diff --git a/examples/mcu-embassy/.cargo/config.toml b/examples/mcu-embassy/.cargo/config.toml index 1784a3865..f6d517232 100644 --- a/examples/mcu-embassy/.cargo/config.toml +++ b/examples/mcu-embassy/.cargo/config.toml @@ -3,12 +3,12 @@ [target.'cfg(all(target_arch = "arm", target_os = "none"))'] rustflags = [ - "-C", - "link-arg=--nmagic", - "-C", - "link-arg=-Tlink.x", - "-C", - "link-arg=-Tdefmt.x", + "-C", + "link-arg=--nmagic", + "-C", + "link-arg=-Tlink.x", + "-C", + "link-arg=-Tdefmt.x", ] runner = "probe-rs run --chip STM32U5G9ZJTxQ" diff --git a/examples/mcu-embassy/Cargo.toml b/examples/mcu-embassy/Cargo.toml index eed662b09..68efbc44b 100644 --- a/examples/mcu-embassy/Cargo.toml +++ b/examples/mcu-embassy/Cargo.toml @@ -19,14 +19,14 @@ defmt = { version = "0.3", optional = true, features = ["alloc"] } defmt-rtt = { version = "0.4", optional = true } panic-probe = { version = "0.3", optional = true, features = ["print-defmt"] } cortex-m = { version = "0.7.7", optional = true, features = [ - "inline-asm", - "critical-section-single-core", + "inline-asm", + "critical-section-single-core", ] } cortex-m-rt = { version = "0.7.3", optional = true } slint-generated = { path = "./slint_generated" } embedded-alloc = { version = "0.5", optional = true } heapless = { version = "0.8", default-features = false, features = [ - "defmt-03", + "defmt-03", ] } tinybmp = { version = "0.5" } static_cell = { version = "2" } @@ -38,25 +38,25 @@ static_cell = { version = "2" } #] } slint = { path = "../../api/rs/slint", default-features = false, features = [ - "compat-1-2", - "unsafe-single-threaded", - "libm", + "compat-1-2", + "unsafe-single-threaded", + "libm", ] } embassy-stm32 = { version = "0.2.0", optional = true, features = [ - "stm32u5g9zj", - "time-driver-any", - "exti", - "memory-x", - "unstable-pac", - "chrono", - "time", - "defmt", + "stm32u5g9zj", + "time-driver-any", + "exti", + "memory-x", + "unstable-pac", + "chrono", + "time", + "defmt", ] } embassy-sync = { version = "0.6.1" } embassy-executor = { version = "0.7.0", features = [ - "task-arena-size-32768", - "executor-thread", + "task-arena-size-32768", + "executor-thread", ] } embassy-time = { version = "0.4.0" } embassy-futures = { version = "0.1.1" } @@ -70,33 +70,33 @@ gt911 = { version = "0.3", features = ["defmt"], optional = true } [features] default = ["mcu"] mcu = [ - "defmt", - "defmt-rtt", - "panic-probe", - "cortex-m", - "cortex-m-rt", - "embassy-stm32", - "embassy-sync/defmt", - "embassy-executor/arch-cortex-m", - "embassy-executor/executor-interrupt", - "embassy-executor/defmt", - "embassy-time/tick-hz-32_768", - "embassy-time/defmt", - "embassy-time/defmt-timestamp-uptime", - "embedded-alloc", - "embedded-hal", - "gt911", + "defmt", + "defmt-rtt", + "panic-probe", + "cortex-m", + "cortex-m-rt", + "embassy-stm32", + "embassy-sync/defmt", + "embassy-executor/arch-cortex-m", + "embassy-executor/executor-interrupt", + "embassy-executor/defmt", + "embassy-time/tick-hz-32_768", + "embassy-time/defmt", + "embassy-time/defmt-timestamp-uptime", + "embedded-alloc", + "embedded-hal", + "gt911", ] simulator = [ - "slint/renderer-software", - "slint/backend-winit", - "slint/std", - "embassy-executor/arch-std", - "embassy-time/std", - "env_logger", - "sdl2", - "object-pool", + "slint/renderer-software", + "slint/backend-winit", + "slint/std", + "embassy-executor/arch-std", + "embassy-time/std", + "env_logger", + "sdl2", + "object-pool", ] [[bin]] diff --git a/examples/mcu-embassy/slint_generated/Cargo.toml b/examples/mcu-embassy/slint_generated/Cargo.toml index 565e2f4fd..bb339dc7c 100644 --- a/examples/mcu-embassy/slint_generated/Cargo.toml +++ b/examples/mcu-embassy/slint_generated/Cargo.toml @@ -16,10 +16,10 @@ homepage = "https://slint.dev" [dependencies] slint = { path = "../../../api/rs/slint", default-features = false, features = [ - "compat-1-2", - "unsafe-single-threaded", - "libm", - "renderer-software", + "compat-1-2", + "unsafe-single-threaded", + "libm", + "renderer-software", ] } i-slint-core-macros = { path = "../../../internal/core-macros" } diff --git a/examples/memory/pyproject.toml b/examples/memory/pyproject.toml index 1b6ea4068..5b18d8e04 100644 --- a/examples/memory/pyproject.toml +++ b/examples/memory/pyproject.toml @@ -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 } diff --git a/examples/plotter/Cargo.toml b/examples/plotter/Cargo.toml index 7039d14a2..7aa55714b 100644 --- a/examples/plotter/Cargo.toml +++ b/examples/plotter/Cargo.toml @@ -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" } diff --git a/examples/todo-mvc/rust/Cargo.toml b/examples/todo-mvc/rust/Cargo.toml index a4cd0ef7c..e8bf32d25 100644 --- a/examples/todo-mvc/rust/Cargo.toml +++ b/examples/todo-mvc/rust/Cargo.toml @@ -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" } diff --git a/examples/todo/rust/Cargo.toml b/examples/todo/rust/Cargo.toml index 9f00d4fd2..99acfba51 100644 --- a/examples/todo/rust/Cargo.toml +++ b/examples/todo/rust/Cargo.toml @@ -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 } - diff --git a/examples/uefi-demo/Cargo.toml b/examples/uefi-demo/Cargo.toml index 13ed317f5..5a9fc7463 100644 --- a/examples/uefi-demo/Cargo.toml +++ b/examples/uefi-demo/Cargo.toml @@ -18,11 +18,11 @@ uefi = { version = "0.33", features = ["panic_handler", "global_allocator"] } minipng = "=0.1.1" slint = { path = "../../api/rs/slint", default-features = false, features = [ - "compat-1-2", - "renderer-software", - "libm", - "log", - "unsafe-single-threaded", + "compat-1-2", + "renderer-software", + "libm", + "log", + "unsafe-single-threaded", ] } log = "0.4.21" diff --git a/internal/backends/android-activity/Cargo.toml b/internal/backends/android-activity/Cargo.toml index b0c32a11b..8149ed6de 100644 --- a/internal/backends/android-activity/Cargo.toml +++ b/internal/backends/android-activity/Cargo.toml @@ -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,14 +36,18 @@ 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 = [ - "aarch64-linux-android", - "armv7-linux-androideabi", - "i686-linux-android", - "x86_64-linux-android", + "aarch64-linux-android", + "armv7-linux-androideabi", + "i686-linux-android", + "x86_64-linux-android", ] features = ["native-activity", "aa-06"] diff --git a/internal/backends/linuxkms/Cargo.toml b/internal/backends/linuxkms/Cargo.toml index e7f94ddd3..758624355 100644 --- a/internal/backends/linuxkms/Cargo.toml +++ b/internal/backends/linuxkms/Cargo.toml @@ -17,31 +17,68 @@ 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" } xkbcommon = { version = "0.8.0" } calloop = { version = "0.14.1" } libseat = { version = "0.2.1", optional = true, default-features = false } -nix = { version = "0.29.0", features=["fs", "ioctl"] } +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 } diff --git a/internal/backends/qt/Cargo.toml b/internal/backends/qt/Cargo.toml index 568f33396..e8bbb34d6 100644 --- a/internal/backends/qt/Cargo.toml +++ b/internal/backends/qt/Cargo.toml @@ -11,12 +11,19 @@ license.workspace = true repository.workspace = true rust-version.workspace = true version.workspace = true -links = "i_slint_backend_qt" # just so we can pass metadata to the dependee's build script +links = "i_slint_backend_qt" # just so we can pass metadata to the dependee's build script [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" @@ -36,4 +43,4 @@ pin-weak = { version = "1", optional = true } qttypes = { version = "0.2.7", default-features = false, optional = true } [build-dependencies] -cpp_build = { version = "0.5.5", optional = true } +cpp_build = { version = "0.5.5", optional = true } diff --git a/internal/backends/selector/Cargo.toml b/internal/backends/selector/Cargo.toml index 78145637a..5c664774f 100644 --- a/internal/backends/selector/Cargo.toml +++ b/internal/backends/selector/Cargo.toml @@ -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 } diff --git a/internal/backends/testing/Cargo.toml b/internal/backends/testing/Cargo.toml index 4ffff1840..b731e5b5e 100644 --- a/internal/backends/testing/Cargo.toml +++ b/internal/backends/testing/Cargo.toml @@ -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" } diff --git a/internal/backends/winit/Cargo.toml b/internal/backends/winit/Cargo.toml index 8a042f7ba..375a6a6db 100644 --- a/internal/backends/winit/Cargo.toml +++ b/internal/backends/winit/Cargo.toml @@ -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 = [] @@ -42,13 +72,17 @@ pin-weak = "1" scoped-tls-hkt = "0.1" winit = { version = "0.30.2", default-features = false } raw-window-handle = { version = "0.6", features = ["alloc"] } -scopeguard = { version = "1.1.0", default-features = false } +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 } @@ -57,16 +91,34 @@ rgb = { version = "0.8.27", optional = true } bytemuck = { workspace = true, optional = true, features = ["derive"] } [target.'cfg(any(target_os = "macos", target_family = "windows"))'.dependencies] -muda = { version = "0.16.0", optional = true} +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"] diff --git a/internal/common/Cargo.toml b/internal/common/Cargo.toml index 7a998d544..5b121efcc 100644 --- a/internal/common/Cargo.toml +++ b/internal/common/Cargo.toml @@ -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 } diff --git a/internal/compiler/Cargo.toml b/internal/compiler/Cargo.toml index 2bc916fd7..4aeced18a 100644 --- a/internal/compiler/Cargo.toml +++ b/internal/compiler/Cargo.toml @@ -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"] @@ -62,7 +68,7 @@ image = { workspace = true, optional = true, features = ["default"] } resvg = { workspace = true, optional = true } # font embedding fontdue = { workspace = true, optional = true, features = ["parallel"] } -fdsm = { version = "0.6.0", optional = true, features = ["ttf-parser"]} +fdsm = { version = "0.6.0", optional = true, features = ["ttf-parser"] } ttf-parser-fdsm = { package = "ttf-parser", version = "0.24.1", optional = true } nalgebra = { version = "0.33.0", optional = true } rayon = { workspace = true, optional = true } diff --git a/internal/core/Cargo.toml b/internal/core/Cargo.toml index 0e4a0a96f..7872052a4 100644 --- a/internal/core/Cargo.toml +++ b/internal/core/Cargo.toml @@ -19,12 +19,28 @@ categories = ["gui", "development-tools", "no-std"] path = "lib.rs" [features] -ffi = ["dep:static_assertions"] # Expose C ABI +ffi = ["dep:static_assertions"] # Expose C ABI 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"] @@ -62,17 +83,19 @@ cfg-if = "1" derive_more = { workspace = true } euclid = { workspace = true } lyon_algorithms = { version = "1.0", optional = true } -lyon_geom = { version = "1.0", optional = true } +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 rgb = "0.8.27" scoped-tls-hkt = { version = "0.1", optional = true } -scopeguard = { version = "1.1.0", default-features = false } +scopeguard = { version = "1.1.0", default-features = false } slab = { version = "0.4.3", default-features = false } static_assertions = { version = "1.1", optional = true } strum = { workspace = true } @@ -91,7 +114,7 @@ fontdb = { workspace = true, optional = true } serde = { workspace = true, optional = true } raw-window-handle-06 = { workspace = true, optional = true } -bitflags = { version = "2.4.2"} +bitflags = { version = "2.4.2" } chrono = { version = "0.4", default-features = false, features = ["alloc"] } @@ -101,30 +124,45 @@ 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 } wasm-bindgen = { version = "0.2" } -web-sys = { workspace = true, features = [ "HtmlImageElement" ] } +web-sys = { workspace = true, features = ["HtmlImageElement"] } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] fontdb = { workspace = true, optional = true, default-features = true } [dev-dependencies] -slint = { path = "../../api/rs/slint", default-features = false, features = ["std", "compat-1-2"] } -i-slint-backend-testing = { path="../backends/testing" } +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 diff --git a/internal/interpreter/Cargo.toml b/internal/interpreter/Cargo.toml index 2ff329a79..6833625d5 100644 --- a/internal/interpreter/Cargo.toml +++ b/internal/interpreter/Cargo.toml @@ -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 @@ -100,8 +112,8 @@ renderer-software = ["i-slint-backend-selector/renderer-software"] # deprecated aliases renderer-winit-femtovg = ["renderer-femtovg"] renderer-winit-skia = ["renderer-skia"] -renderer-winit-skia-opengl= ["renderer-skia-opengl"] -renderer-winit-skia-vulkan= ["renderer-skia-vulkan"] +renderer-winit-skia-opengl = ["renderer-skia-opengl"] +renderer-winit-skia-vulkan = ["renderer-skia-vulkan"] renderer-winit-software = ["renderer-software"] ## Enable integration with operating system provided accessibility APIs (default: enabled) @@ -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. @@ -130,7 +145,7 @@ internal-json = ["dep:serde_json"] [dependencies] -i-slint-compiler = { workspace = true } +i-slint-compiler = { workspace = true } i-slint-common = { workspace = true } i-slint-core = { workspace = true, features = ["default", "rtti"] } i-slint-backend-selector = { workspace = true, features = ["rtti"] } @@ -151,11 +166,13 @@ unicode-segmentation = { workspace = true } [target.'cfg(target_arch = "wasm32")'.dependencies] i-slint-backend-winit = { workspace = true } -web-sys = { workspace = true, features=[ "Navigator" ] } +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" } diff --git a/internal/renderers/femtovg/Cargo.toml b/internal/renderers/femtovg/Cargo.toml index 8a86003b0..ec7051f02 100644 --- a/internal/renderers/femtovg/Cargo.toml +++ b/internal/renderers/femtovg/Cargo.toml @@ -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" } diff --git a/internal/renderers/skia/Cargo.toml b/internal/renderers/skia/Cargo.toml index fe8e215ad..88096b973 100644 --- a/internal/renderers/skia/Cargo.toml +++ b/internal/renderers/skia/Cargo.toml @@ -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,37 +60,48 @@ 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] objc2 = { version = "0.6.0" } objc2-metal = { version = "0.3.0", default-features = false, features = [ - "std", - "MTLCommandQueue", - "MTLCommandBuffer", - "MTLResource", - "MTLTexture", - "MTLTypes", + "std", + "MTLCommandQueue", + "MTLCommandBuffer", + "MTLResource", + "MTLTexture", + "MTLTypes", ] } objc2-foundation = { version = "0.3.0", default-features = false, features = [ - "std", - "NSGeometry", + "std", + "NSGeometry", ] } objc2-quartz-core = { version = "0.3.0", default-features = false, features = [ - "std", - "objc2-metal", - "CALayer", - "CAMetalLayer", - "objc2-core-foundation", + "std", + "objc2-metal", + "CALayer", + "CAMetalLayer", + "objc2-core-foundation", ] } objc2-app-kit = { version = "0.3.0", default-features = false, features = [ - "std", - "NSResponder", - "NSView", + "std", + "NSResponder", + "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" diff --git a/tests/doctests/Cargo.toml b/tests/doctests/Cargo.toml index fba585ff6..79de32497 100644 --- a/tests/doctests/Cargo.toml +++ b/tests/doctests/Cargo.toml @@ -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 } diff --git a/tests/driver/cpp/Cargo.toml b/tests/driver/cpp/Cargo.toml index ab948e2ac..30f084a3c 100644 --- a/tests/driver/cpp/Cargo.toml +++ b/tests/driver/cpp/Cargo.toml @@ -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" diff --git a/tests/driver/interpreter/Cargo.toml b/tests/driver/interpreter/Cargo.toml index 24d9aa8e1..fc189683d 100644 --- a/tests/driver/interpreter/Cargo.toml +++ b/tests/driver/interpreter/Cargo.toml @@ -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 } diff --git a/tests/driver/rust/Cargo.toml b/tests/driver/rust/Cargo.toml index 01d4f13d6..e6f25e0a1 100644 --- a/tests/driver/rust/Cargo.toml +++ b/tests/driver/rust/Cargo.toml @@ -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" } diff --git a/tests/screenshots/Cargo.toml b/tests/screenshots/Cargo.toml index 16f3d9f3f..ab816dafa 100644 --- a/tests/screenshots/Cargo.toml +++ b/tests/screenshots/Cargo.toml @@ -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" } diff --git a/tools/compiler/Cargo.toml b/tools/compiler/Cargo.toml index e20b0abc9..4d7c23a10 100644 --- a/tools/compiler/Cargo.toml +++ b/tools/compiler/Cargo.toml @@ -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" diff --git a/tools/docsnapper/Cargo.toml b/tools/docsnapper/Cargo.toml index f48e924c2..a62878b63 100644 --- a/tools/docsnapper/Cargo.toml +++ b/tools/docsnapper/Cargo.toml @@ -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 } diff --git a/tools/lsp/Cargo.toml b/tools/lsp/Cargo.toml index 4a3eb189d..2c588d742 100644 --- a/tools/lsp/Cargo.toml +++ b/tools/lsp/Cargo.toml @@ -55,8 +55,8 @@ eventloop-qt = ["backend-qt"] renderer-winit-qt = ["backend-qt"] renderer-winit-femtovg = ["renderer-femtovg"] renderer-winit-skia = ["renderer-skia"] -renderer-winit-skia-opengl= ["renderer-skia-opengl"] -renderer-winit-skia-vulkan= ["renderer-skia-vulkan"] +renderer-winit-skia-opengl = ["renderer-skia-opengl"] +renderer-winit-skia-vulkan = ["renderer-skia-vulkan"] renderer-winit-software = ["renderer-software"] ## Enable support for previewing .slint files @@ -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,20 +107,26 @@ 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 } [target.'cfg(not(target_arch = "wasm32"))'.dependencies] clap = { workspace = true } -crossbeam-channel = "0.5" # must match the version used by lsp-server +crossbeam-channel = "0.5" # must match the version used by lsp-server lsp-server = "0.7" [target.'cfg(target_arch = "wasm32")'.dependencies] console_error_panic_hook = "0.1.5" js-sys = { version = "0.3.57" } -web-sys = { workspace = true, features=[ "Navigator" ] } +web-sys = { workspace = true, features = ["Navigator"] } send_wrapper = { workspace = true } serde-wasm-bindgen = "0.6.0" wasm-bindgen = "0.2.80" diff --git a/tools/tr-extractor/Cargo.toml b/tools/tr-extractor/Cargo.toml index 32f3d4f8f..142f6d6fd 100644 --- a/tools/tr-extractor/Cargo.toml +++ b/tools/tr-extractor/Cargo.toml @@ -12,11 +12,14 @@ license.workspace = true repository.workspace = true rust-version.workspace = true version.workspace = true -categories = [ "gui", "command-line-utilities", "development-tools" ] +categories = ["gui", "command-line-utilities", "development-tools"] [dependencies] -i-slint-compiler = { workspace = true, features = ["default", "display-diagnostics"] } -chrono = {version = "0.4.24", default-features = false, features = ["clock"] } +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" smol_str = { workspace = true } diff --git a/tools/updater/Cargo.toml b/tools/updater/Cargo.toml index ee2a2ad04..739bb0090 100644 --- a/tools/updater/Cargo.toml +++ b/tools/updater/Cargo.toml @@ -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" diff --git a/tools/viewer/Cargo.toml b/tools/viewer/Cargo.toml index c0e2dc89e..98127fdae 100644 --- a/tools/viewer/Cargo.toml +++ b/tools/viewer/Cargo.toml @@ -37,8 +37,8 @@ eventloop-qt = ["backend-qt"] renderer-winit-qt = ["backend-qt"] renderer-winit-femtovg = ["renderer-femtovg"] renderer-winit-skia = ["renderer-skia"] -renderer-winit-skia-opengl= ["renderer-skia-opengl"] -renderer-winit-skia-vulkan= ["renderer-skia-vulkan"] +renderer-winit-skia-opengl = ["renderer-skia-opengl"] +renderer-winit-skia-vulkan = ["renderer-skia-vulkan"] renderer-winit-software = ["renderer-software"] ## Enable the translations using [gettext](https://www.gnu.org/software/gettext/gettext) @@ -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"