Support For WASM Backend

LVGL has numerous backends however it doesn’t have one for WASM, which is a new platform that allows any programming language that isn’t like JS (eg Kotlin) to target the web browser, without have to transpile to JS. Already there have been some successful attempts to port LVGL to WASM, however every single one is tightly coupled at the program level and only works with certain programming languages (C, C++, Rust etc).

If LVGL were to have a WASM backend then the basic idea would be for LVGL to provide C header files for generating mapping files to cover C interop, and WASM object files to generate a WASM module (roughly equivalent to the ELF file format). This would cover high level languages like Kotlin that support using C libraries, however an augmented system may be required for system level languages like Rust.

Already there are many languages like Kotlin that have WASM support that is either production ready, or is in development. Supporting WASM will require a complete overhaul of LVGL’s configuration system, build process, and driver architecture.

I also see a big potential in wasm support due to it’s platform independent nature.
I started a conversation at wasm3 about a possible integration but there is nothing concrete so far.

Generating a WASM binding could be much easier if we had a property descriptor table as discussed here. Using the table and binding could be generated quite easily.