tree: 85ccbafb9a93c0c6175d73b7dedb138ceae80d0d [path history] [tgz]
  1. npm-asmjs/
  2. npm-wasm/
  3. perf/
  4. tests/
  5. .gitignore
  6. BUILD.bazel
  7. chaining.js
  8. CHANGELOG.md
  9. compile.sh
  10. externs.js
  11. helper.js
  12. karma.bench.conf.js
  13. karma.conf.js
  14. Makefile
  15. package-lock.json
  16. package.json
  17. pathkit_wasm_bindings.cpp
  18. README.md
modules/pathkit/README.md

PathKit WASM API

The PathKit library lets you use Skia's feature-rich PathOps API in the browser.

Compiling the source

Compiling with GN

Get a compiled Enscriptem SDK in your path. This is easiest done by running //tools/git-sync-deps which downloads and then runs //bin/activate-emsdk.

To compile a production WASM build to //out/pathkit:

./compile.sh

Add --help for more options.

Compiling with Bazel

To compile a production WASM build to //bazel-bin/modules/pathkit/pathkit:

bazelisk build //modules/pathkit:pathkit --config=ck_full_webgl2_release

A debug build:

bazelisk build //modules/pathkit:pathkit --config=ck_full_webgl2_debug

Testing

Running example page locally:

# First build PathKit
make release
# Then run a local test server
make local-example

Then follow messages to navigate the browser to the example page.

Automated tests

Testing the GN build

make release
make npm
npm ci
make test-continuous

Testing the Bazel build

make debug-bazel
make npm-bazel
npm ci
make test-continuous

Deploying to npm

NOTE: The deployment steps use the GN build.

# Build the release version for both asmjs and WASM
# These binaries will be placed in the proper places of npm-*/bin
make npm

# In each npm- subdirectory, run:
npm version minor (or patch or major)
npm login --registry https://wombat-dressing-room.appspot.com
npm publish