Skip to content

Conversation

@spotandjake
Copy link

This pr moves execution of the user js and wasm module from the main page to a web worker. The benefit of this is if you write an infinite loop in either the js or wasm you won't crash the main page and can recompile. I also added a Run button as I noticed there wasn't one and it was useful for testing (when you edit the wasm the output doesn't update until you click run or edit the js).

NOTE

As the js is now running in a worker it is isolated so while before you could have worked with the dom from the js editor you can't really do this anymore. I feel like the old behaviour didn't make much sense anyways though.

@spotandjake spotandjake force-pushed the spotandjake-demo-worker branch from 91a8e44 to b67fde0 Compare March 22, 2025 00:42
@spotandjake
Copy link
Author

Hope I'm not bugging anyone, but any chance I could get a review on this?

Copy link
Member

@sbc100 sbc100 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fair enough!

Seems like it might be overkill for a simple demo but if you find it useful to be able to avoid blocking the main page then lgtm.

Its been while since we changed this I think.. do you know how we publish the new version? Is it automatic?

@spotandjake spotandjake force-pushed the spotandjake-demo-worker branch from b67fde0 to 40913ce Compare December 14, 2025 02:24
@spotandjake
Copy link
Author

spotandjake commented Dec 14, 2025

Fair enough!

Seems like it might be overkill for a simple demo but if you find it useful to be able to avoid blocking the main page then lgtm.

Its been while since we changed this I think.. do you know how we publish the new version? Is it automatic?

I know that this is just a demo however I know myself and others in the wasm community sometimes use this tooling to explore the spec and play around hands on with wasm in a convient and quick manner.

I wasn't around the last time this was updated and can't find any specific workflows for it however I did notice that github pages seems to run on every commit to main logs here so it seems like this should just get updated.

Seperatly though this is probably best discussed in another issue it might make sense to run make demo on release to regenerate the libwabt.js file.

Thankyou for the review.

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