Skip to content

Graphics bindings ​

The wasm package's optional graphics feature provides the supported xila_graphics_call interface. Core uses LVGL 9.6. Sources: executables/wasm/README.md and executables/wasm/src/host/graphics.

Supported calls ​

FamilySupported operations
WindowsCreation, icon, event retrieval
ObjectsCreation/deletion, flex flow/grow, width/height, flags
LabelsCreation and text
Button matricesCreation, map, selected button
GeometryPercentage conversion

Calculator exercises this subset. Weather needs APIs beyond it. Unsupported calls keep their IDs in the generated catalog; the supported-call table checks complete C signatures.

Calls requiring arbitrary native structure layouts, guest callbacks, retained guest pointers, fonts/images/charts, or other unsupported LVGL APIs return an unsupported status. Guest memory is not interpreted as a typed host reference.

Resource limits ​

ResourceLimit/behavior
Issued object handles256 per execution, including deleted handles; handles are not reused during execution.
Button-map entries64 including the sentinel.
NUL-terminated string1024 bytes.
Retained map strings8192 bytes per widget, including the native sentinel.
Map terminationNull and empty-string guest sentinels become LVGL's empty-string terminator; row separators are preserved.

Status codes ​

CodeMeaning
0Success
1Invalid count
2Invalid memory
3Unavailable capability
4Unsupported call
5Invalid handle
6Resource limit
7Invalid value
8Native failure

Compatibility ​

Guest and host bindings must use the same LVGL revision and configuration. Generated call IDs do not establish a stable cross-version graphics ABI. Event transport preserves numeric codes, including window-close requests, rather than treating unknown values as valid Rust enum variants.

Guest-only applications disable wasm's default features and select guest,graphics,memory_32. default_guest additionally enables C wrappers and emits xila_graphics.h in the build output; generation does not rewrite guest source files.