lovyan03 / LovyanGFX

SPI LCD graphics library for ESP32 (ESP-IDF/ArduinoESP32) / ESP8266 (ArduinoESP8266) / SAMD51(Seeed ArduinoSAMD51)
Other
1.03k stars 189 forks source link

make the CMake_WASM example work again #470

Closed mhaberler closed 6 months ago

mhaberler commented 6 months ago

this works for me including in-browser C-level debugging with the modified lgfx::Panel_sdl API

unsure if this is the right way to do it - grateful for a review

tobozo commented 6 months ago

thanks :+1:

I will try to add a github workflow to test the WASM example and prevent code erosion in the future, I'm a complete noob with WASM too :hand_over_mouth: and this is the perfect occasion to learn more

can you confirm these are the steps to follow:

mhaberler commented 6 months ago

yes, that is the steps I followed - no specific version, just latest

have a look at the notes in the README - very useful tutorial referenced there install Chrome Canary and the extension as outlined, then try debugging in Canary

tobozo commented 6 months ago

install Chrome Canary and the extension as outlined

that's for local testing, right? while it makes sense to mention it in the readme, the github workflow probably won't need that as the assets will be published on github pages

mhaberler commented 6 months ago

nope, local testing only - nothing todo with this repo

tobozo commented 6 months ago

puslishing to github-pages seems to work on my fork

mhaberler commented 6 months ago

excellent!

mhaberler commented 6 months ago

hm, try this with Canary: https://static.mah.priv.at/public/lovyan.html I can source-debug that: image

I cannot with yours: https://tobozo.github.io/LovyanGFX/WASM/ , unclear why: image

I guess this is the filepath mapping issue mentioned in the tutorial

anyway good to go!

tobozo commented 6 months ago

oh the workflow only published the index.html file, more files are required maybe?

I try to keep my machine Chrome-free so I didn't test with the extension :wink:

mhaberler commented 6 months ago

no I dont think so, I just pushed index.html to my server

it seems SINGLE_FILE=1 wraps all assets including DWARF info into the wasm blob could be an artefact of running a remote builder causing path name divergence

I have given up resistance on chrome ;)