Experiment with a desktop environment using imgui
cc #438
Progress:

Unfortunately it's quite complicated to compile:
AR_wasm32_wasi=/home/pierre/Projets/wasi-sdk-10.0/bin/ar CXX_wasm32_wasi=/home/pierre/Projets/wasi-sdk-10.0/bin/clang++ CXXFLAGS_wasm32_wasi="-fno-threadsafe-statics --sysroot=/home/pierre/Projets/wasi-sdk-10.0/share/wasi-sysroot" CARGO_TARGET_WASM32_WASI_LINKER=/home/pierre/Projets/wasi-sdk-10.0/bin/lld CXXSTDLIB_wasm32_wasi=c++ CARGO_TARGET_WASM32_WASI_RUSTFLAGS="-Clink-arg=-L/home/pierre/Projets/wasi-sdk-10.0/share/wasi-sysroot/lib/wasm32-wasi" cargo run --target=wasm32-wasi --release
Progress report: everything is working fine, but the next step is to gather mouse/keyboard events, otherwise the UI itself is kind of pointless.
Progress report:
-
Mouse movements work, not mouse clicks nor keyboard yet.
-
It works but is still extremely slow. With wasmtime it works okay-ish (around 10 fps on my machine), but the unoptimized software rendering and multiple copies of the framebuffer is really not great.
-
Need to set up the CI for this module to compile. Considering how difficult it is to compile this locally, maybe is the time to actually set up the IPFS-like network for people to download a pre-compiled version.
Should be based on #498
I'm now getting "bad relocation type" linking errors, presumably because Rust now uses LLVM 11.0 but the WASI SDK is still at LLVM 10.0. It should be possible to fix this by manually passing paths to the lld that ships with Rust, but that's not very future-proof.