Looking for a prebuilt canvaskit for webgpu. I tried to build it from source but failed

9 views
Skip to first unread message

Miguel Camba

unread,
May 29, 2026, 12:06:41 PM (2 days ago) May 29
to skia-discuss
Hi all,

 I'm trying to evaluate Skia/Graphite + WebGPU would bring more performance for some animations were running mostly on mobile devices. It would improve the experience of some millions of users.

Can anyone here share a recent prebuilt canvaskit_webgpu.{js,wasm} for me to try?

Possibly even an slightly old build would allow us to validate wether skia on webgpu would actually bring performance increases or not.

I did try for several hours to get it to build from source but it's an absolute minefiled.

  - canvaskit-wasm 0.34.x → 0.41.1 on npm — no WebGPU variant in any tarball.
  - Built from source with ./compile.sh webgpu on macOS arm64 with the bundled emsdk 4.0.7. Outcomes per tag:
    - canvaskit/0.39.1: pinned Dawn (Oct 2023) is too old. Skia source references 16-bit texture formats (R16Unorm, etc.) that don't exist in that Dawn
    - canvaskit/0.41.0: pinned Dawn has tint::Bindings referenced in dawn/src/dawn/native/TintUtils.h but the public umbrella dawn/include/tint/tint.h doesn't include src/tint/api/common/bindings.h — looks like a missed include. Patched that locally and the build progressed further but then DawnCaps.cpp references
  wgpu::FeatureName::DualSourceBlending / TextureFormatsTier1 / R8BG8Biplanar420Unorm which the bundled emscripten 4.0.7's in-tree webgpu/webgpu_cpp.h doesn't define. There's clearly a version missmatch here.
    - chrome/m149: same build_dawn.py (no wasm/emcmake handling) and same emsdk pin as above. 
    - Skia main + standalone emsdk 5.0.7 + --use-port=emdawnwebgpu (newest port shipped with emsdk): builds 1119/1128 .o files cleanly, then 30+ Skia files fail because emdawnwebgpu has the renamed Dawn APIwhile Skia main code still uses the older names  (e.g. wgpu::SupportedLimits).
    - All three Skia trees I checked have third_party/dawn/build_dawn.py calling plain cmake + native clang. Even if I patch all the source, link fails.

  So at the moment I genuinely can't find a (Skia tag, Dawn pin, emscripten/emdawnwebgpu version) triple where all three are mutually consistent AND compile.sh webgpu produces a wasm-compatible Dawn library. 
I also checked the CI recipes from dawn for clues, but failed to find anything useful.

I also scouted every source I could find to see if anywhere there's a a prebuilt webgpu wasm file, but I found nothing.


  Specifically helpful would be:

1. A webgpu build ready to use, so I can validate if this will even bring benefits to the users.
2. A build recipe and commit/sha(s) that works.

  Thanks,
  Miguel
Reply all
Reply to author
Forward
0 new messages