Cargo Features
[dependencies]
slint-lsp = { version = "1.8.0", default-features = false, features = ["backend-qt", "backend-winit", "backend-winit-x11", "backend-winit-wayland", "backend-linuxkms", "backend-linuxkms-noseat", "backend-default", "renderer-femtovg", "renderer-skia", "renderer-skia-opengl", "renderer-skia-vulkan", "renderer-software", "backend-gl-all", "backend-gl-wayland", "backend-gl-x11", "renderer-winit-qt", "renderer-winit-femtovg", "renderer-winit-skia", "renderer-winit-skia-opengl", "renderer-winit-skia-vulkan", "renderer-winit-software", "preview", "preview-lense", "preview-api", "preview-engine", "preview-builtin", "preview-external"] }
- backend-qt eventloop-qt? renderer-winit-qt? = preview
-
Enables backend-qt of slint
slint:
Backends
Slint needs a backend that will act as liaison between Slint and the OS. By default, Slint will use the Qt backend, if Qt is installed, otherwise, it will use Winit with FemtoVG. Both backends are compiled in. If you want to not compile one of these you need to disable the default feature and re-enable one backend. It is also possible to use Slint without backend if you provide the platform abstraction yourself with [
platform::set_platform()
].If you enable the Winit backend, you need to also include a renderer.
renderer-femtovg
is the only stable renderer, the other ones are experimentalIt is also possible to select the backend and renderer at runtime when several are enabled, using the
SLINT_BACKEND
environment variable.SLINT_BACKEND=Qt
selects the Qt backendSLINT_BACKEND=winit
selects the winit backendSLINT_BACKEND=winit-femtovg
selects the winit backend with the FemtoVG rendererSLINT_BACKEND=winit-skia
selects the winit backend with the skia rendererSLINT_BACKEND=winit-software
selects the winit backend with the software renderer
If the selected backend is not available, the default will be used.
Here are the cargo features controlling the backend:
The Qt backend feature uses Qt for the windowing system integration and rendering. 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-winit backend-gl-all? = preview
-
Enables backend-winit of slint
slint:
The 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 compiling for Linux or other Unix-like operating systems. With this feature, both X11 and Wayland are supported. For a smaller build, omit this feature and select one of the other specific
backend-winit-XX
features. - backend-winit-x11 backend-gl-x11? = preview
-
Enables backend-winit-x11 of slint
slint:
Simliar to
backend-winit
this enables the winit based event loop but only with support for the X Window System on Unix. - backend-winit-wayland backend-gl-wayland? = preview
-
Enables backend-winit-wayland of slint
slint:
Simliar to
backend-winit
this enables the winit based event loop but only with support for the Wayland window system on Unix. - backend-linuxkms = preview
-
Enables backend-linuxkms of slint
slint:
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) - backend-linuxkms-noseat = preview
-
Enables backend-linuxkms-noseat of slint
slint:
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-default default = preview
-
Enables backend-default of slint
slint:
Alias to a backend and renderer that depends on the platform.
Will select the Qt backend on linux if present, and the winit otherwise - renderer-femtovg default backend-gl-all? backend-gl-wayland? backend-gl-x11? renderer-winit-femtovg? = preview
-
Enables renderer-femtovg of slint
slint:
Render using the FemtoVG crate.
- renderer-skia renderer-winit-skia? = preview
-
Enables renderer-skia of slint
slint:
Render using Skia.
- renderer-skia-opengl renderer-winit-skia-opengl? = preview
-
Enables renderer-skia-opengl of slint
slint:
Same as
renderer-skia
, but Skia will always use OpenGL. - renderer-skia-vulkan renderer-winit-skia-vulkan? = preview
-
Enables renderer-skia-vulkan of slint
slint:
Same as
renderer-skia
, but Skia will always use Vulkan. - renderer-software default renderer-winit-software? = preview
-
Enables renderer-software of slint
slint:
Render using the software renderer.
- backend-gl-all = backend-winit, renderer-femtovg
-
Compat
- backend-gl-wayland = backend-winit-wayland, renderer-femtovg
- backend-gl-x11 = backend-winit-x11, renderer-femtovg
- eventloop-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-software = renderer-software
- preview default backend-default backend-linuxkms? backend-linuxkms-noseat? backend-qt? backend-winit? backend-winit-wayland? backend-winit-x11? renderer-femtovg renderer-skia? renderer-skia-opengl? renderer-skia-vulkan? renderer-software = preview-builtin, preview-engine, preview-external
-
Enable support for previewing .slint files
- preview-lense
-
[deprecated] Used to enable the "Show Preview" lenses and action on components.
- preview-api = preview-external
-
[deprecated] Used to enable partial support for external previewers.
Use "preview-external" (and maybe "preview-engine" if you want the LSP binary to provide an implementation of the external preview API when building for WASM) - preview-engine preview preview-builtin?
-
Build in the actual code to act as a preview for slint files.
Enables i-slint-backend-selector, i-slint-backend-winit, i-slint-common, i-slint-core, image ^0.24, muda ^0.14.1, objc2-foundation, slint, slint-build, and slint-interpreter
i-slint-backend-selector:
for the preview-engine feature
Affects
component_catalog::builtin_components
,component_catalog::file_local_components
,document_cache::document_cache_parts_setup
,common::lsp_to_editor
,completion::create_import_edit
,language::request_state
,language::Context.to_show
,properties::set_bindings
,properties::update_element_properties
… - preview-builtin preview = preview-engine
-
Build in the actual code to act as a preview for slint files. Does nothing in WASM!
Affects
language::show_preview_command
… - preview-external preview preview-api?
-
Support the external preview optionally used by e.g. the VSCode plugin
Affects
common::lsp_to_editor
,completion::create_import_edit
,language::request_state
,language::Context.to_show
,language::show_preview_command
,properties::set_bindings
,properties::update_element_properties
… - default = backend-default, preview, renderer-femtovg, renderer-software
-
These default features are set whenever
slint-lsp
is added without
somewhere in the dependency tree.default-features = false