Today we're releasing Slint version 0.2.5, with new features and some bug fixes. This release maintains backwards source compatibility. Applications developed with previous releases in the 0.2.x series will continue to run with version 0.2.5. Let's look at the highlights:
VS Code Web Extension
We're bringing our Slint VS Code extension to Visual Studio Code for the Web. Install the extension to get the same syntax highlighting, code completion, and live-preview - running in your web browser.
The Slint Language Server is written in Rust and runs as a separate process. We cross-compile the server now to Web Assembly, run it as a Web Worker, and substitute the stdin and stdout channels with a message-passing bridge. This is how code completion, diagnostics, semantic syntax highlighting, and more become available in the web extension.
The live-preview shows a window from within the Slint Language Server process. We can't show a window from a Web Worker, so instead we now create a "webview" to embed Slint cross-compiled to Web Assembly and with our WebGL renderer enabled. That's the same engine that we're also using for our preview of snippets in the documentation.
To use the extension, open a
.slint file in
github.dev. For example, you can open
our printer demo
in your web browser, install the Slint extension from the extensions tab
in the side bar, and then enjoy the live-preview and code completion.
It's important to us that Slint applications can be used by everyone, especially users that require assistive technology. This version of Slint adds support for making applications accessible on the desktop.
You can now annotate your items with
accessible properties, to make them interact well with software like screen readers or braille
Our widgets use these
accessible properties for an improved
The run-time library exposes a tree of items and their accessible properties to the operating system's accessibility layer. This is done with the help of Qt, which supports the major desktop platforms. We will add other back-end implementations in the future.
- Text input fields are not accessible yet. This requires more annotations and support for accessible actions.
- Relations between objects aren't implemented yet.
We intend to improve the widgets to be more keyboard friendly and add
accessibleproperties where that makes sense.
- Different accessibility back-ends so that we don't have to rely on the presence of Qt.
Smaller, Noteworthy Features
In Rust, use the new
MapModelto transform any existing slint::Model. These adapter models update automatically when the underlying source model changes.
In addition to
@linear-gradient()it's now also possible to specify radial gradients with
Use the new
read-onlyproperty with the text editing widgets
TextInputto stop them from accepting input.
- Code completion now also offers components that haven't been imported yet. Accepting the completion will add the necessary import statement.
For a detailed list of all changes, check out the CHANGELOG.md
Thank you to everyone who contributed, especially the numerous external contributors.
We hope that you'll enjoy upgrading to this new version. If you're using
Slint with Rust and Cargo, just run
cargo update to update
your application to the latest release. If you're using our CMake
FetchContent, update the
GIT_TAG entry in your
CMakeLists.txt to specify
v0.2.5 or you can also use
automatically follow all 0.2.x releases.
If you run into any issues or notice missing functionality, please don't hesitate to let us know. We would love to get your feedback. You can get in touch with us via our GitHub site, email, or via chat on our Mattermost instance.