Skip to content

WIP: Workshop/slint#495

Open
georgik wants to merge 3 commits intoespressif:mainfrom
georgik:workshop/slint
Open

WIP: Workshop/slint#495
georgik wants to merge 3 commits intoespressif:mainfrom
georgik:workshop/slint

Conversation

@georgik
Copy link
Collaborator

@georgik georgik commented Jun 3, 2025

Add workshop about Slint UI with Rust no_std for ESP32-S3.

series: ["slint-no-std"]
series_order: 1
showAuthor: false
---
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be nice to add the summary on each assignment.

@georgik georgik self-assigned this Oct 24, 2025
@georgik
Copy link
Collaborator Author

georgik commented Oct 24, 2025

Update: Planned update in 2025-11. Please keep open

@georgik
Copy link
Collaborator Author

georgik commented Dec 10, 2025

@SergioGasquez You can find here the preview of the workshop.

@github-actions
Copy link

🎉 A preview for this PR is available at: https://preview-developer.espressif.com/pr495/

Copy link
Collaborator

@FBEZ FBEZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@georgik I'm testing the workshop. Below some comments about the first assignment.

```sh
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add "restart your shell" otherwise it's not in path and the following command fails.

Comment on lines +72 to +75
- **[M5Stack CoreS3](https://shop.m5stack.com/products/m5stack-cores3-esp32s3-lotdevelopment-kit)** (recommended - touchscreen, speakers, microphone)
- [ESoPe Board SLD_C_W_S3 with Schukat Smartwin display-concept](https://esope.de) (RGB interface)
- Alternative boards: [ESP32-S3-BOX-3](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_box_3), [ESP32-S3-LCD-EV-Board](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_lcd_ev_board)
- USB-C cable for M5Stack CoreS3 and ESP32-S3-BOX-3, or USB micro cable with [ESP-Prog](https://docs.espressif.com/projects/esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html) for ESoPe board
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- **[M5Stack CoreS3](https://shop.m5stack.com/products/m5stack-cores3-esp32s3-lotdevelopment-kit)** (recommended - touchscreen, speakers, microphone)
- [ESoPe Board SLD_C_W_S3 with Schukat Smartwin display-concept](https://esope.de) (RGB interface)
- Alternative boards: [ESP32-S3-BOX-3](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_box_3), [ESP32-S3-LCD-EV-Board](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_lcd_ev_board)
- USB-C cable for M5Stack CoreS3 and ESP32-S3-BOX-3, or USB micro cable with [ESP-Prog](https://docs.espressif.com/projects/esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html) for ESoPe board
One the following boards:
- **[M5Stack CoreS3](https://shop.m5stack.com/products/m5stack-cores3-esp32s3-lotdevelopment-kit)** (recommended - touchscreen, speakers, microphone)
- [ESoPe Board SLD_C_W_S3 with Schukat Smartwin display-concept](https://esope.de) (RGB interface)
- Alternative boards: [ESP32-S3-BOX-3](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_box_3), [ESP32-S3-LCD-EV-Board](https://github.com/espressif/esp-bsp/tree/master/bsp/esp32_s3_lcd_ev_board)
- USB-C cable for M5Stack CoreS3 and ESP32-S3-BOX-3, or USB micro cable with [ESP-Prog](https://docs.espressif.com/projects/esp-iot-solution/en/latest/hw-reference/ESP-Prog_guide.html) for ESoPe board

Comment on lines +66 to +68

⚠️ Do **not** use the `--std` flag — we are developing in `no_std`.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
⚠️ Do **not** use the `--std` flag — we are developing in `no_std`.
{{< alert >}}
Do **not** use the `--std` flag — we are developing in `no_std`.
{{< /alert >}}

Comment on lines +77 to +98
#### Temporary (for current shell)

```sh
. $HOME/export-esp.sh
```

#### Persistent (recommended)

Append the export file to your shell configuration (e.g. `.bashrc`, `.zshrc`):

```sh
cat $HOME/export-esp.sh >> ~/.bashrc
```

Then:

```sh
source ~/.bashrc
```

On **Windows**, this is done automatically.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not really sure about that, but maybe tabs work better here.

Suggested change
#### Temporary (for current shell)
```sh
. $HOME/export-esp.sh
```
#### Persistent (recommended)
Append the export file to your shell configuration (e.g. `.bashrc`, `.zshrc`):
```sh
cat $HOME/export-esp.sh >> ~/.bashrc
```
Then:
```sh
source ~/.bashrc
```
On **Windows**, this is done automatically.
{{< tabs groupId="installation" >}}
{{% tab name="Termporary" %}}
```sh
. $HOME/export-esp.sh
```
{{% /tab %}}
{{% tab name="Persistent" %}}
Append the export file to your shell configuration (e.g. `.bashrc`, `.zshrc`):
```sh
cat $HOME/export-esp.sh >> ~/.bashrc
```
Then:
```sh
source ~/.bashrc
```
On **Windows**, this is done automatically.
...
{{% /tab %}}
{{< /tabs >}}

Comment on lines +118 to +159
---

## Development Approach: `no_std` vs `std`

### `no_std` Approach

**This workshop uses the `no_std` approach by default.** The setup above is perfect for `no_std` development.

**Project Directory Structure:**
```
esp32/no_std/
├── m5stack-cores3/ # M5Stack CoreS3 implementation
├── esope-sld-c-w-s3/ # ESoPe board implementation
├── esp32-s3-box-3/ # ESP32-S3-BOX-3 implementation
└── esp32-s3-lcd-ev-board/ # LCD-EV board implementation
```

### `std` Approach

**If you specifically need ESP-IDF/std features**, you can also set up for `std` development:

```sh
# For std development, install with --std flag
espup install --std
```

**Project Directory Structure:**
```
esp32/std/
├── m5stack-cores3/ # M5Stack CoreS3 std implementation
├── esope-sld-c-w-s3/ # ESoPe board std implementation
├── esp32-s3-box-3/ # ESP32-S3-BOX-3 std implementation
└── esp32-s3-lcd-ev-board/ # LCD-EV board std implementation
```

**Note:** `std` approach requires additional ESP-IDF setup and is more complex. **We recommend starting with `no_std`** for this workshop.

---

### Next Step

Now that your environment is ready, let’s run our first Slint GUI app on the desktop.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since the workshop is about no-std, I would avoid giving the discussion about std here again. I'd include it in the upper level _index (where it's already mentioned) or skip it altogether.

Copy link
Collaborator

@FBEZ FBEZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some comments about assignment 2 and assignment 3

Comment on lines +32 to +33
# Dev version
git clone https://github.com/georgik/slint-esp-workshop.git
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why we should download this repo too. Maybe explain it in a sentence before the command.


The GUI is defined in `.slint` files under the `ui/` directory. Here's a brief overview:

- `appwindow.slint`: the top-level window layout
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see a mainwindow.slint. But I'm using the repo Wilston0reo since it was labelled "workshop version" above.


---

## About `.slint` Files
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how you'll structure the workshop, but I'm not sure about dropping these explanations here. They seem a bit terse and out of place.
Consider putting theseinformation (+ the dev no-dev difference etc) in a separate place/file like "explanations" or "Introduction to Slint with rust"

Comment on lines +12 to +19
## Supported Boards

This workshop supports the following boards:

- **M5Stack CoreS3** (recommended - touchscreen, speakers, microphone)
- **ESoPe Board (SLD_C_W_S3)** with RGB interface display (Schukat Smartwin concept)
- **ESP32-S3-BOX-3**
- **ESP32-S3-LCD-EV-Board**
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This info was already given in the _index.md. I'd suggest to put a link on that section like

Connect one of the suggested bards. In this workshop we will use the M5Stack CoreS3


### 1. Connect Your Board

Plug in your ESP32-S3-based board via USB. If you're using the **ESoPe board**, ensure your ESP-Prog programmer is connected to both UART lines.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid mixing instructions for all the boards, I'd suggest to put it into a separate info box. This way we don't mix instructions for all the boards.

Suggested change
Plug in your ESP32-S3-based board via USB. If you're using the **ESoPe board**, ensure your ESP-Prog programmer is connected to both UART lines.
Plug in your ESP32-S3-based board via USB.
{{< alert icon="circle-info" cardColor="#b3e0f2" iconColor="#04a5e5">}}
If you're using the **ESoPe board**, ensure your ESP-Prog programmer is connected to both UART lines.
{{< /alert >}}

Comment on lines +51 to +64
#### `std` Path (Alternative)

If you specifically need ESP-IDF features, navigate to the `std` directory:

```bash
# For M5Stack CoreS3
cd slint-esp-workshop/esp32/std/m5stack-cores3

# For ESP32-S3-BOX-3
cd slint-esp-workshop/esp32/std/esp32-s3-box-3

# Other boards available in std/ directory
```

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the _index it's stated that the workshop will focus on no_std. I find it confusing to try to explain all the approaches at once. I would recommend to just focus on no_std and avoid all other mentions to std.

If you think it's important to give both options then maybe the best way is to use tabs to avoid mixing both approaches in the same workflow.

Here an example of tabs

{{< tabs groupId="devtool" >}}
      {{% tab name="VS Code extension" %}}
            If you’re using a simple text editor and the CLI commands, you can follow the instruction on the get-started guide (linux/mac-os | windows ).
      {{% /tab %}}
      {{% tab name="CLI" %}}
            Open VSCode, press CTRL+SHIFT+P and start typing ESP-IDF: New Project.
      ...
      {{% /tab %}}
{{< /tabs >}}


#### `no_std` Path (Recommended) ✅

Navigate to the `no_std` directory for your specific board:
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The folder in the cloned repo is called esp32-no_std

Comment on lines +75 to +95
---

## Entering Bootloader Mode

In order to flash the board, it must be in **bootloader mode**. If you encounter issues flashing, use the following guide:

### Built-in USB UART Boards

For boards with built-in USB-to-serial (e.g. S3-BOX-3 or LCD-Ev-Board):

1. Press and **hold** the **BOOT** button
2. While holding BOOT, **press and release** the **RESET** button
3. **Release BOOT**

This sequence ensures the chip enters bootloader mode.

### ESoPe with ESP-Prog

If you're using an external ESP-Prog programmer, bootloader mode is usually handled automatically. However, **after flashing is complete**, you will need to press **RESET** manually to start the application.

---
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using the recommended board I didn't need to press the boot button.
If you want to support all the boards at once, consider putting this info in a tab.

Comment on lines +104 to +107
If your display remains blank:
- Double-check display connections and power supply
- Ensure `espflash` selected the correct port
- Use verbose logging `cargo run --release -v` to debug
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
If your display remains blank:
- Double-check display connections and power supply
- Ensure `espflash` selected the correct port
- Use verbose logging `cargo run --release -v` to debug
{{< alert iconColor="#df8e1d" cardColor="#edcea3">}}
If your display remains blank:
- Double-check display connections and power supply
- Ensure `espflash` selected the correct port
- Use verbose logging `cargo run --release -v` to debug
{{< /alert >}}

Copy link
Collaborator

@FBEZ FBEZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At this assignment I got stuck. I am not sure how to use std::process:Command" nor I have a viewmodel.rs`.

- On **Linux**: `nmcli -t -f SSID dev wifi`
- On **Windows**: `netsh wlan show networks mode=bssid`

Your Rust application can invoke these commands using `std::process::Command`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where should I put this?


## Step 2: Populate the Model

Update your `viewmodel.rs` to use a `ModelRc<WifiNetwork>` and expose it to the Slint UI.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any viewmodel.rs in the repo.

@FBEZ
Copy link
Collaborator

FBEZ commented Dec 19, 2025

@georgik I got stuck at assignment 4. Please take a look at these two steps highlighted in the last comments.

@FBEZ
Copy link
Collaborator

FBEZ commented Mar 3, 2026

@georgik did you get the chance to review the comments?

Before I forgot, if you’re considering a version 2 of the workshop, here are a few general suggestions:

  1. The workshop currently supports both std and no_std. As someone new to Rust, I found that supporting both at the same time added some confusion. It might be clearer to focus on just one option.

  2. The workshop also supports multiple boards simultaneously. I feel it makes the material heavier and occasionally harder to follow. That said, I have the feeling that we need to support multiple boards anyway because of the event itself.

  3. The explanations and the step-by-step instructions are interleaved. It might improve clarity to separate them, either by presenting the full explanation first and then the steps, or the other way around.

  4. Participants need to clone two different repositories, and it isn’t always clear when each one should be used. Putting everything into a single repository could make the workshop easier to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants