Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make the CMake_WASM example work again #470

Merged
merged 1 commit into from
Nov 10, 2023

Conversation

mhaberler
Copy link

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
Copy link
Collaborator

tobozo commented Nov 10, 2023

thanks 👍

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 🤭 and this is the perfect occasion to learn more

can you confirm these are the steps to follow:

  • git clone https://github.com/emscripten-core/emsdk.git
  • cd emsdk
  • ./emsdk install latest # any specific version?
  • ./emsdk activate latest
  • source ./emsdk_env.sh
  • cd examples_for_PC/CMake_WASM
  • mkdir build
  • cd build
  • emcmake cmake ..
  • emmake make
  • publish html/js/wasm on github pages

@mhaberler
Copy link
Author

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 tobozo merged commit fe3815a into lovyan03:develop Nov 10, 2023
100 checks passed
@tobozo
Copy link
Collaborator

tobozo commented Nov 10, 2023

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

tobozo added a commit that referenced this pull request Nov 10, 2023
@mhaberler
Copy link
Author

nope, local testing only - nothing todo with this repo

@mhaberler mhaberler deleted the patch-wasm-example branch November 10, 2023 13:28
@tobozo
Copy link
Collaborator

tobozo commented Nov 10, 2023

puslishing to github-pages seems to work on my fork

@mhaberler
Copy link
Author

excellent!

@mhaberler
Copy link
Author

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
Copy link
Collaborator

tobozo commented Nov 10, 2023

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 😉

@mhaberler
Copy link
Author

mhaberler commented Nov 10, 2023

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 ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants