redshirt icon indicating copy to clipboard operation
redshirt copied to clipboard

Experiment with a desktop environment using imgui

Open tomaka opened this issue 5 years ago • 4 comments

cc #438

Progress: Screenshot from 2020-05-04 22-16-28

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

tomaka avatar May 04 '20 20:05 tomaka

Progress report: everything is working fine, but the next step is to gather mouse/keyboard events, otherwise the UI itself is kind of pointless.

tomaka avatar May 23 '20 15:05 tomaka

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.

tomaka avatar Jun 17 '20 16:06 tomaka

Should be based on #498

tomaka avatar Jul 12 '20 09:07 tomaka

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.

tomaka avatar Oct 24 '20 13:10 tomaka