Slint 1.4 released: lightweight cross-platform GUI toolkit for Rust, C++ and JavaScript

Slint 1.4 released: lightweight cross-platform GUI toolkit for Rust, C++ and JavaScript
A fix

The Slint team has released version 1.4 of its cross-platform GUI toolkit for Rust, C++ and JavaScript, with new features including a Cosmic style imitating Pop!_OS, support for Windows system tray applications, easier use with Deno, and progress towards Android support.

Slint is an open source project run by a small company, SixtyFPS GmbH, based in Germany. The toolkit is coded in Rust and uses its own Domain Specific Language (DSL) to define a user interface. The user interface may optionally be rendered with OpenGL, Skia, or by a software renderer with no additional dependencies. The logic of an application is written in Rust, C++ or JavaScript outside the browser, using Node.js or Deno.

The new cosmic style in Slint, inspired by Pop!_OS

Slint’s target platforms are Windows x86-64, macOS Intel or Apple Silicon, Linux, Linux-based embedded platforms, and web via WebAssembly, though this last is primarily for demos rather than production code. The Slint runtime fits in less than 300KB RAM, making it an attractive choice for developers of embedded systems. 

There are four different styles for Slint user interface widgets: fluent (Windows), material (Google), Cupertino (Mac) and – new in this release – cosmic (Pop!_OS). Pop!_OS is a Linux distribution developed by System76.

Additional APIs in version 1.4 include a double-clicked callback for TouchArea components, the ability to keep the event loop alive without any displayed windows to support running in a system tray, and a programmatic option to show a window fullscreen.

JavaScript developers no longer need to compile Slint’s Rust code from source, since binaries are provided for macOS, Windows and Linux. This also simplifies use with Deno. Android support is under development, but currently experimental using a separate build. 

The team also revealed, in the post introducing 1.4, that the Slint compiler has been optimized to speed application compile times by up to 50 percent.

The Slint runtime uses Rust but application code can be C++, Rust or JavaScript

The GUI framework space is a crowded one, though less so for Rust than for other languages. Tauri is perhaps the best known, though this uses HTML rendered in a Webview – likely to use more system resources than Slint at runtime. 

Other options include gtk-rs, for using the GNOME widget toolkit with Rust; Iced, which is inspired by the Elm language but is still a work in progress; and Azul which uses Mozilla’s WebRender engine.

Why not Google’s Flutter for a cross-platform GUI? Flutter is now the most popular tool for this – but for developers in search of something lighter weight that does not require coding in Dart, Slint has its place.