Promisify emscripten modules & fix webp examples #817
Merged
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.
It seems a promise-based API was added to modularized Emscripten builds in response to emscripten-core/emscripten#5820:
PR: emscripten-core/emscripten#10697
Since consolidating C++ builds (#781), the
emscripten/emsdk
Docker image produces module factory functions that return a promise for the emscripten module. This PR:webp
examples:codecs/webp/enc/example.html
&codecs/webp/dec/example.html
by using the new promise-based API.initEmscriptenModule
to just call module factory.PS: Thanks for all the work here. I've modeled the C++ builds for one of my projects on squoosh's codecs, which is how I ran into this. Much appreciated!