Example of LVLG in Rust compiled to WASM.
Find a file
2020-09-22 09:46:47 +02:00
.cargo Compile to Emscripten HTML file 2020-09-22 09:46:47 +02:00
include Example compiles to emscripten 2020-09-21 20:07:36 +02:00
src Example compiles to emscripten 2020-09-21 20:07:36 +02:00
.gitattributes Ignore include header path 2020-09-21 21:00:43 +02:00
.gitignore Compile to Emscripten HTML file 2020-09-22 09:46:47 +02:00
Cargo.lock Use branch reference in deps 2020-09-21 20:53:30 +02:00
Cargo.toml Use branch reference in deps 2020-09-21 20:53:30 +02:00
LICENSE Initial commit 2020-09-21 20:06:42 +02:00
README.md Use branch reference in deps 2020-09-21 20:53:30 +02:00
Web.toml Example compiles to emscripten 2020-09-21 20:07:36 +02:00

LVGL Rust to WASM

Example of LVLG in Rust compiling to WASM.

Setup

  • Install Emscripten
# Get the emsdk repo
git clone https://github.com/emscripten-core/emsdk.git

# Enter that directory
cd emsdk

# Download and install the latest SDK tools.
./emsdk install latest

# Make the "latest" SDK "active" for the current user. (writes .emscripten file)
./emsdk activate latest

# Activate PATH and other environment variables in the current terminal
source ./emsdk_env.sh

https://emscripten.org/docs/getting_started/downloads.html

  • Compile SDL2:
$ embuilder.py build sdl2
  • Compile the example project:
cargo +nightly build --target=wasm32-unknown-emscripten

References: