Right now we’re creating a Feature Phone UI (in Zig) for Apache NuttX RTOS (Real-Time Operating System) on Pine64 PinePhone. Yeah through sheer tena

(Possibly) LVGL in WebAssembly with Zig Compiler

submited by
Style Pass
2023-05-30 04:30:03

Right now we’re creating a Feature Phone UI (in Zig) for Apache NuttX RTOS (Real-Time Operating System) on Pine64 PinePhone.

Yeah through sheer tenacity we tracked down lv_obj_clear_flag and all the Missing LVGL Functions called by our Zig LVGL App…

Be careful! We might miss out some Undefined Variables… Zig Compiler blissfully assumes they’re at WebAssembly Address 0. And remember to compile the LVGL Fonts!

Up Next: Feature Phone UI for PinePhone! To make our Feature Phone clickable, we’ll pass Mouse Events from JavaScript to LVGL.

We’ll experiment with Live Reloading: Whenever we save our Zig LVGL App, it auto-recompiles and auto-reloads the WebAssembly HTML.

TODO: For easier debugging, how to disassemble Compiled WebAssembly with cross-reference to Source Code? Similar to “objdump –source”? Maybe with wabt or binaryen?

Leave a Comment