d1285b131b
Changes are largely mechanical. Non-mechanical changes to support newer versions of emscripten are enumerated below, in format ${EMSCRIPTEN_VERSION}: ${RELEVANT_CHANGE}. - 1.39.9: TOTAL_MEMORY has been renamed INITIAL_MEMORY. - 1.39.12: passing of linker flags to wasm-ld has changed in a way that requires supplying `--no-entry` to avoid error message "wasm-ld: error: entry symbol not defined (pass --no-entry to suppress): main". - 1.39.16: The factory function created by using `MODULARIZE` build option now returns a Promise instead of the module instance. As such, the ready.js workaround is removed. Note this is a breaking API change for CanvasKit, which now uses just `then()` and not `ready().then()`. - 1.38.33: `emsdk install` hasn't required the `-64bit` suffix on version names since `1.38.33`, so we remove them. E.g. `emsdk install sdk-1.39.6-64bit` simply becomes `emsdk install sdk-1.39.16`. cf. https://github.com/emscripten-core/emscripten/blob/master/ChangeLog.md Bug: NONE Change-Id: Iabec4bd5ad7db2e0715ad42c2e4cf7d67b192b4c Reviewed-on: https://skia-review.googlesource.com/c/skia/+/291182 Reviewed-by: Kevin Lubick <kjlubick@google.com> |
||
---|---|---|
.. | ||
npm-asmjs | ||
npm-wasm | ||
perf | ||
tests | ||
.gitignore | ||
chaining.js | ||
CHANGELOG.md | ||
compile.sh | ||
externs.js | ||
helper.js | ||
karma.bench.conf.js | ||
karma.conf.js | ||
Makefile | ||
package.json | ||
pathkit_wasm_bindings.cpp | ||
README.md | ||
serve.py |
PathKit WASM API
This library lets you use Skia's feature-rich PathOps API in the browser.
Compiling the source
Download the Enscriptem SDK.
Set the EMSDK environment variable to the directory you installed it to.
Run ./compile.sh
to compile a production, WASM build to $SKIA_HOME/out/pathkit
.
Add "--help" for more options.
Deploying to npm
# Build all 3 versions (release, test, debug) for both asmjs and WASM
# These binaries will be placed in the proper places of npm-*/bin
# This takes 5-10 minutes.
make npm
# Update the package.json files of both npm-asmjs and npm-wasm
make update-patch # or update-minor or update-major
# Publish both repos
make publish