tree: eb8c3e0b64476036b4ac1651eb86f6defee101bc [path history] [tgz]
  1. npm-asmjs/
  2. npm-wasm/
  3. perf/
  4. tests/
  5. .gitignore
  6. BUILD.bazel
  7. chaining.js
  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


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:


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


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
npm publish