Embedded
Slint runs on many embedded platforms.
The platform descriptions below cover what has been tested for deployment. For the development environment, we recommend using a recent desktop operating system and compiler version.
Embedded Linux
Section titled “Embedded Linux”Slint runs on a variety of embedded Linux platforms. Generally speaking, Slint requires a modern Linux userspace with working OpenGL ES 2.0 (or newer) or Vulkan drivers. We’ve had success running Slint on
- Yocto based distributions.
- BuildRoot based distributions.
- Torizon.
For C++ applications see meta-slint ↗ for recipes.
Rust applications work out of the box with Yocto’s Rust support.
Toradex provides Torizon OS ↗, a Linux based platform for its embedded devices that packages applications in docker containers.
We provide our demos compiled for Toradex as docker containers with and without GPU acceleration support.
Prerequisites
Section titled “Prerequisites”- A device running Torizon OS 6.0 or later
- SSH access to the Torizon device
- Docker installed on the device
Note: The Slint demos run directly on the linux/kms and do not require a Weston container.
Running
Section titled “Running”Our pre-compiled demos are available in multiple variants optimized for different hardware platforms:
- Standard ARM64 without GPU build (
torizon-demos-arm64) - Uses software rendering - i.MX8 GPU build (
torizon-demos-arm64-imx8) - Optimized for i.MX8 series with GPU acceleration - AM62 GPU build (
torizon-demos-arm64-am62) - Optimized for AM62 series with GPU acceleration - i.MX95 GPU build (
torizon-demos-arm64-imx95) - Optimized for i.MX95 series with GPU acceleration
A complete list of all containers can be found at
https://github.com/orgs/slint-ui/packages?q=torizon&tab=packages&q=torizon ↗
For example, to run the container on an i.MX8 board with GPU, use the following command line:
sudo docker run --rm --privileged \ --user=torizon \ -v /dev:/dev \ -v /tmp:/tmp \ -v /run/udev:/run/udev \ --device-cgroup-rule='c 199:* rmw' \ --device-cgroup-rule='c 226:* rmw' \ --device-cgroup-rule='c 13:* rmw' \ --device-cgroup-rule='c 4:* rmw' \ ghcr.io/slint-ui/slint/torizon-demos-arm64-imx8Selecting Demos
Section titled “Selecting Demos”By default, the energy-monitor demo is run. The containers package multiple demo applications:
- energy-monitor (default) - Energy monitoring dashboard
- printerdemo - 3D printer control interface
- gallery - Image gallery with touch navigation
- slide_puzzle - Interactive sliding puzzle game
- opengl_underlay - OpenGL rendering demonstration
- carousel - 3D carousel interface
- todo - Task management application
- weather-demo - Weather information display (requires API key)
- home-automation - Smart home control panel
Run a specific demo by specifying it as a parameter to docker run, for example:
sudo docker run --rm --privileged --user=torizon \ -v /dev:/dev -v /tmp:/tmp -v /run/udev:/run/udev \ --device-cgroup-rule='c 199:* rmw' --device-cgroup-rule='c 226:* rmw' \ --device-cgroup-rule='c 13:* rmw' --device-cgroup-rule='c 4:* rmw' \ ghcr.io/slint-ui/slint/torizon-demos-arm64-imx8 printerdemoMicrocontrollers
Section titled “Microcontrollers”Slint’s platform abstraction allows for integration into any Rust or C++ based Microcontroller development environment. Developers need to implement functionality to feed input events such as touch or keyboard, as well as displaying the pixels rendered by Slint into a frame- or linebuffer.
We provide templates for a few off-the-shelf development boards from some of the silicon vendors.
You will need to use the mcu-board-support crate. This crate re-export a entry attribute macro to apply to the main function, and a init()
function that should be called before creating the Slint UI.
In order to use this backend, the final program must depend on both slint and mcu-board-support.
The main.rs will look something like this
#![no_std]#![cfg_attr(not(feature = "simulator"), no_main)]slint::include_modules!();
#[allow(unused_imports)]use mcu_board_support::prelude::*;
#[mcu_board_support::entry]fn main() -> ! { mcu_board_support::init(); MainWindow::new().run(); panic!("The event loop should not return");}Since mcu-board-support is at the moment an internal crate not uploaded to crates.io, you must use the git version of slint, slint-build, and mcu-board-support
[dependencies]slint = { git = "https://github.com/slint-ui/slint", default-features = false }mcu-board-support = { git = "https://github.com/slint-ui/slint" }# ...[build-dependencies]slint-build = { git = "https://github.com/slint-ui/slint" }In your build.rs, you must include a call to slint_build::print_rustc_flags().unwrap() to set some of the flags.
Espressif (ESP32)
Section titled “Espressif (ESP32)”To use Slint with your C++ application, you can follow the instructions on the Espressif Documentation site ↗
ST (STM32)
Section titled “ST (STM32)”STM32H735G-DK
Section titled “STM32H735G-DK”You can start with the template slint-cpp-template-stm32h735g-dk.zip
STM32H747I-DISCO
Section titled “STM32H747I-DISCO”You can start with the template slint-cpp-template-stm32h747i-disco.zip
Follow the steps below to run the Slint Printer Demo
STM32H735G-DK
Section titled “STM32H735G-DK”Using probe-rs ↗.
CARGO_PROFILE_RELEASE_OPT_LEVEL=s CARGO_TARGET_THUMBV7EM_NONE_EABIHF_RUNNER="probe-rs run --chip STM32H735IGKx" cargo run -p printerdemo_mcu --no-default-features --features=mcu-board-support/stm32h735g --target=thumbv7em-none-eabihf --releaseRaspberry Pi (Pico)
Section titled “Raspberry Pi (Pico)”Only Rust programs are currently supported on the Raspberry Pi Pico.
On the Raspberry Pi Pico
Section titled “On the Raspberry Pi Pico”Ensure the right target is set:
rustup target add thumbv6m-none-eabiBuild the Slint Printer demo with:
cargo build -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789 --target=thumbv6m-none-eabi --releaseThe resulting file can be flashed with elf2uf2-rs ↗. Install it using:
cargo install elf2uf2-rsNow power off the Pico and connect it while holding down the “bootsel” button. The device will show up as a storage device
with the name RPI-RP2.
Then flash the demo to the Pico with:
elf2uf2-rs -d target/thumbv6m-none-eabi/release/printerdemo_mcuWhen the flashing completes the Pico will reboot and show the Slint Printer demo. The Mac will warn the drive was unmounted unexpectedly. This is expected and can be ignored.
Now power off the Pico and connect it while holding down the “bootsel” button. The device will show up as a storage device.
Mount the device:
udisksctl mount -b /dev/sda1Then flash the demo to the Pico with:
elf2uf2-rs -d target/thumbv6m-none-eabi/release/printerdemo_mcuOn the Raspberry Pi Pico2
Section titled “On the Raspberry Pi Pico2”Build the Slint Printer demo with:
cargo build -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico2-st7789 --target=thumbv8m.main-none-eabihf --releaseThe resulting file can be flashed conveniently with picotool ↗. You should build it from source.
Then upload the demo to the Raspberry Pi Pico: push the “bootsel” white button on the device while connecting the micro-usb cable to the device, this connects some USB storage on your workstation where you can store the binary.
Or from the command on linux (connect the device while pressing the “bootsel” button):
# If you're on Linux: mount the deviceudisksctl mount -b /dev/sda1# uploadpicotool load -u -v -x -t elf target/thumbv8m.main-none-eabihf/release/printerdemo_mcuUsing probe-rs
Section titled “Using probe-rs”This requires probe-rs ↗ and to connect the pico via a probe (for example another pico running the probe).
Then you can simply run with cargo run
CARGO_TARGET_THUMBV6M_NONE_EABI_LINKER="flip-link" CARGO_TARGET_THUMBV6M_NONE_EABI_RUNNER="probe-rs run --chip RP2040" cargo run -p printerdemo_mcu --no-default-features --features=mcu-board-support/pico-st7789 --target=thumbv6m-none-eabi --releaseFlashing and Debugging the Pico with probe-rs’s VSCode Plugin
Section titled “Flashing and Debugging the Pico with probe-rs’s VSCode Plugin”Install probe-rs-debugger and the VSCode plugin as described here ↗.
Add this build task to your .vscode/tasks.json:
{ "version": "2.0.0", "tasks": [ { "type": "cargo", "command": "build", "args": [ "--package=printerdemo_mcu", "--features=mcu-pico-st7789", "--target=thumbv6m-none-eabi", "--profile=release-with-debug" ], "problemMatcher": [ "$rustc" ], "group": "build", "label": "build mcu demo for pico" }, ]}The release-with-debug profile is needed, because the debug build does not fit into flash.
You can define it like this in your top level Cargo.toml:
[profile.release-with-debug]inherits = "release"debug = trueNow you can add the launch configuration to .vscode/launch.json:
{ "version": "0.2.0", "configurations": [ { "preLaunchTask": "build mcu demo for pico", "type": "probe-rs-debug", "request": "launch", "name": "Flash and Debug MCU Demo", "cwd": "${workspaceFolder}", "connectUnderReset": false, "chip": "RP2040", "flashingConfig": { "flashingEnabled": true, "resetAfterFlashing": true, "haltAfterReset": true }, "coreConfigs": [ { "coreIndex": 0, "rttEnabled": true, "programBinary": "./target/thumbv6m-none-eabi/release-with-debug/printerdemo_mcu" } ] }, ]}This was tested using a second Raspberry Pi Pico programmed as a probe with DapperMime ↗.
Other Platforms
Section titled “Other Platforms”Contact us ↗ if you want to use Slint on other platforms/versions.
© 2025 SixtyFPS GmbH