[Web export] Add htmllocal export to use locally built wasm #2839
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Add htmllocal export to use locally built wasm, so you can use the latest (or a custom) TIC-80 build in the browser. This is a more or less a high fidelity proof of concept, it works for my use case but I'm not that sure if it is a good fit (if there are reasons for you not to want to do it this way).
Basically, we just bake the local build/html files (wasm included) into the TIC-80 executable at build time. Then when you do
export htmllocal mygame, it'll use those files instead of doing a network call and getting them from the server instead (also means you can export for web while offline for what it's worth).It works well enough for what I wanted, which was to test out the safari keyboard fix I added a PR for earlier! (#2838)
Claude code wrote practically all the code here. I will not be hurt if you don't merge this, very little human effort went into it but I do find it useful and functional :)