LVGL in WebAssembly: Building NuttX Touchscreen Apps with Zig and testing them in the Web Browser
Lup Yuen LEE
Our Story Today
2
Why LVGL with WebAssembly?
3
“NuttX NextGen”?
4
WebAssembly with Zig
WebAssembly
LVGL
Display
Input
UI
Why Zig
6
Compare C and Zig
7
WebAssembly with Zig
8
9
JavaScript calls Zig WebAssembly
10
JavaScript renders to HTML Canvas
11
Zig Calls JavaScript
12
LVGL in WebAssembly
WebAssembly
LVGL
Display
Input
UI
LVGL App in Zig
14
LVGL App in WebAssembly
15
Compile LVGL to WebAssembly with Zig Compiler
16
LVGL Porting Layer for WebAssembly
17
WebAssembly Logger for LVGL
18
LVGL Display
WebAssembly
LVGL
Display
Input
UI
20
21
Render LVGL Display in Zig
22
23
Render LVGL Display in JavaScript
24
25
Handle LVGL Tasks
26
Handle LVGL Tasks: JavaScript Timer calls Zig
27
Initialise LVGL Display
28
LVGL Input
WebAssembly
LVGL
Display
Input
UI
30
31
Handle LVGL Input
32
LVGL Input Device
33
Feature Phone UI
WebAssembly
LVGL
Display
Input
UI
Feature Phone with LVGL, Zig and NuttX
35
36
LVGL Containers, Labels and Buttons
37
Display Container with Digit Label
38
Call Container with LVGL Buttons
39
40
LVGL Buttons in Zig
41
Handle LVGL Buttons
42
Handle Call Button and Digit Buttons
43
Works on WebAssembly AND PinePhone!
44
Feature Phone App in WebAssembly
45
Phone Calls and SMS over 4G
46
47
“NuttX NextGen”?
48
PinePhone
Allwinner A64
PinePhone Pro
Rockchip RK3399
i.MX 8QuadMax MEK�NXP i.MX 8
Star64�StarFive JH7110
49
PinePhone
Allwinner A64
PinePhone Pro
Rockchip RK3399
i.MX 8QuadMax MEK�NXP i.MX 8
Star64�StarFive JH7110
Banana Pi M64 /
Olimex A64 /
Pine64 LTS
Retro Pixel Pocket
Pinebook Pro /
Chromebooks
VisionFive2 /
Milk-V Mars
Librem 5
Phone
Mars CM
Orange Pi /
Rock Pi 4 /
RockPro64
PineTab2�(RK3566)
PineTab-V
Powkiddy RGB30 (RK3566)
SOQuartz�(RK3566)
Olimex TERES-I /
Pinebook
Arm64
RISC-V
“NuttX NextGen”?
50
Arm / RISC-V SoC | Allwinner A64 | Rockchip RK3399 | NXP i.MX 8 | StarFive JH7110 |
Smartphone | PinePhone | PinePhone Pro | Librem 5 | |
SBC | Banana Pi M64 / Olimex A64 / Pine64 LTS | Orange Pi / Rock Pi 4 / RockPro64 | i.MX 8QuadMax MEK | Star64 / VisionFive2 / Milk-V Mars |
Tablet | | PineTab2* | | PineTab-V |
Laptop | Olimex TERES-I / Pinebook | Pinebook Pro / Chromebooks | | |
CM4 SoM | | SOQuartz* | | Mars CM |
Gaming Handheld | Retro Pixel Pocket | Powkiddy RGB30* | | |
*RK3566
Articles
51
Thank You
52